Skip to content

Commit 17be3a0

Browse files
Nadiia Dfacebook-github-bot
Nadiia D
authored andcommitted
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
1 parent 2052bb6 commit 17be3a0

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

Libraries/ReactNative/AppContainer.js

-15
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
1313
import StyleSheet from '../StyleSheet/StyleSheet';
1414
import {type EventSubscription} from '../vendor/emitter/EventEmitter';
1515
import {RootTagContext, createRootTag} from './RootTag';
16-
import PropTypes from 'prop-types';
1716
import * as React from 'react';
1817

19-
type Context = {rootTag: number, ...};
20-
2118
type Props = $ReadOnly<{|
2219
children?: React.Node,
2320
fabric?: boolean,
@@ -45,18 +42,6 @@ class AppContainer extends React.Component<Props, State> {
4542

4643
static getDerivedStateFromError: any = undefined;
4744

48-
static childContextTypes:
49-
| any
50-
| {|rootTag: React$PropType$Primitive<number>|} = {
51-
rootTag: PropTypes.number,
52-
};
53-
54-
getChildContext(): Context {
55-
return {
56-
rootTag: this.props.rootTag,
57-
};
58-
}
59-
6045
componentDidMount(): void {
6146
if (__DEV__) {
6247
if (!global.__RCTProfileIsProfiling) {

0 commit comments

Comments
 (0)