react-native-macos
react-native-macos copied to clipboard
Incompatible with React 16.3 Context Provider API
🐛 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