Skip to content

Cannot read property 'changedBits' of undefined #12645

@danielkcz

Description

@danielkcz

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.

image

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.

image

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions