/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v18.3.0
fixtures/stacks/Components.js
30 строк
528 B
Sebastian Markbåge
Fix Component Stacks for IE and Native Classes in Safari (#18575)
11 апр 2020, 05:39
Не верифицирован
11 апр 2020, 05:39
72d00ab
Код
Авторство
О чём код?
// Example const Throw = React.lazy(() => { throw new Error('Example'); }); const Component = React.memo(function Component({children}) { return children; }); function DisplayName({children}) { return children; } DisplayName.displayName = 'Custom Name'; class NativeClass extends React.Component { render() { return this.props.children; } } class FrozenClass extends React.Component { constructor() { super(); } render() { return this.props.children; } } Object.freeze(FrozenClass.prototype);