Summary:
Changelog:
[General][Added] - Stabilize RootTagContext. And temporarily export both `unstable_RootTagContext` and `RootTagContext`

Reviewed By: TheSavior

Differential Revision: D27951427

fbshipit-source-id: dff8d4ca07c89edeeb517a42a3922e4e23899d8e
This commit is contained in:
Nadiia D 2021-04-26 22:56:28 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 8719a2e9a9
Коммит 9d489354ae
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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(

Просмотреть файл

@ -17,7 +17,7 @@ import {
FlatList,
Platform,
TouchableOpacity,
unstable_RootTagContext,
RootTagContext,
} from 'react-native';
import * as React from 'react';
@ -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: {},