Skip to content

Commit

Permalink
Stabilize RootTagContext
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[General][Added] - Stabilize RootTagContext. And temporarily export both `unstable_RootTagContext` and `RootTagContext`

Reviewed By: TheSavior

Differential Revision: D27951427

fbshipit-source-id: dff8d4ca07c89edeeb517a42a3922e4e23899d8e
  • Loading branch information
Nadiia D authored and facebook-github-bot committed Apr 27, 2021
1 parent 8719a2e commit 9d48935
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ module.exports = {
get unstable_RootTagContext(): RootTagContext {
return require('./Libraries/ReactNative/RootTag').RootTagContext;
},
get RootTagContext(): RootTagContext {
return require('./Libraries/ReactNative/RootTag').RootTagContext;
},
get unstable_enableLogBox(): () => void {
return () =>
console.warn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
FlatList,
Platform,
TouchableOpacity,
unstable_RootTagContext,
RootTagContext,
} from 'react-native';
import * as React from 'react';

Expand All @@ -33,7 +33,7 @@ type State = {|
|};

class SampleTurboModuleExample extends React.Component<{||}, State> {
static contextType: React$Context<RootTag> = unstable_RootTagContext;
static contextType: React$Context<RootTag> = RootTagContext;

state: State = {
testResults: {},
Expand Down

0 comments on commit 9d48935

Please sign in to comment.