-
Notifications
You must be signed in to change notification settings - Fork 49.5k
Closed
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Using the new Context API in React Native app ends up with an exception.
Unfortunately, I am unable to provide viable reproduction environment. I tried the CodeSandbox and Snack Expo and both are working just fine. This is happening in my React Native app running on my Android phone. Only thing I've got is this screenshot from the debugger.
Strangely enough if that code on line 8439
would read providerFiber.type._context
then it would have been working correctly. Any chance there is a typo? :)
export const rootContext = React.createContext<TRootModel>()
export const RootProvider = rootContext.Provider
export const App = () => (
<RootProvider value={RootModel.create()}>
<Text>OK</Text>
</RootProvider>
)
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
- react: 16.3.2
- react-native: 0.54.2
- Windows 10 x64
Metadata
Metadata
Assignees
Labels
No labels