react-redux: Incompatible with React 16 beta
The following error crashes the app when using React 16 beta.
React caught an error thrown by Provider. You should fix this error in your code. Consider adding an error boundary to your tree to customize error handling behavior. See https://fb.me/react-error-boundaries for more information.
Error: null
The error is located at:
in Provider
The error was thrown at:
Other error messages that might be relevant:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
invariant.js?c115:44 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
By removing react-redux or downgrading to React 15.x it works correctly.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (20 by maintainers)
in case it helps anyone in the future, i just upgraded to react 16 and was using react-redux, react-router and react-router-redux and getting the same error. i had to use the @next version of react-router-redux to resolve it.
We really should have this thread on the
react
repo.Well, since this is the rare bug with React itself, I’m closing this out. Thanks @gartz for the original heads up!
I’m guessing because CodeSandbox runs in an iframe and is shipped code/data externally, it doesn’t have the right security context to access the error object or stack trace.