Remove legacy context API usage
Summary: Changelog: [General][Removed] - Remove legacy context API usage in AppContainer Reviewed By: kacieb Differential Revision: D27681097 fbshipit-source-id: 7391be577955171ade5b8fd53cf274900f88e7ca
This commit is contained in:
Родитель
2052bb63b5
Коммит
17be3a0032
|
@ -13,11 +13,8 @@ import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
|
|||
import StyleSheet from '../StyleSheet/StyleSheet';
|
||||
import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
||||
import {RootTagContext, createRootTag} from './RootTag';
|
||||
import PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
|
||||
type Context = {rootTag: number, ...};
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
children?: React.Node,
|
||||
fabric?: boolean,
|
||||
|
@ -45,18 +42,6 @@ class AppContainer extends React.Component<Props, State> {
|
|||
|
||||
static getDerivedStateFromError: any = undefined;
|
||||
|
||||
static childContextTypes:
|
||||
| any
|
||||
| {|rootTag: React$PropType$Primitive<number>|} = {
|
||||
rootTag: PropTypes.number,
|
||||
};
|
||||
|
||||
getChildContext(): Context {
|
||||
return {
|
||||
rootTag: this.props.rootTag,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
if (__DEV__) {
|
||||
if (!global.__RCTProfileIsProfiling) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче