Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with React 16.3 Context Provider API #246

Open
kirill-konshin opened this issue Aug 13, 2019 · 0 comments
Open

Incompatible with React 16.3 Context Provider API #246

kirill-konshin opened this issue Aug 13, 2019 · 0 comments
Labels

Comments

@kirill-konshin
Copy link

kirill-konshin commented Aug 13, 2019

🐛 Bug Report

To Reproduce

Following code:

const Context = React.createContext();

const Foo = () => (<Context.Provider value={'xxx'}/>);

will result in an error:

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

I caught this error when I was using [email protected] https://github.com/apollographql/react-apollo/releases/tag/v2.5.3:

The ApolloProvider / ApolloConsumer implementations have been refactored
to use React 16.3's new context API.

React installed in the project is at version 16.9.0.

I suspect it's because react-native-macos is far behind modern react-native which supports hooks and context API properly, see #226.

Environment

  • macOS v10.14.6
  • react-native-macos v0.19.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant