Skip to content

Commit

Permalink
Remove legacy context API usage
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[General][Removed] - Remove legacy context API usage in AppContainer

Reviewed By: kacieb

Differential Revision: D27681097

fbshipit-source-id: 7391be577955171ade5b8fd53cf274900f88e7ca
  • Loading branch information
Nadiia D authored and facebook-github-bot committed Apr 18, 2021
1 parent 2052bb6 commit 17be3a0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Libraries/ReactNative/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 17be3a0

Please sign in to comment.