-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Improve handling of React Native version warnings #72
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
Improve handling of React Native version warnings #72
Conversation
@udfalkso since React Native is not using React 0.14 the correct fix would be to change https://github.com/udfalkso/react-redux/blob/console-warn-instead-of-error-for-function-wrap/src/components/createProvider.js#L6 to In fact i believe it is a genuine bug that we are returning false here since the only version of React today not using Parent Context is 0.14 beta. |
mind recreating the PR with that one change? Or i can do so in a minute |
29fdf27
to
b820c3b
Compare
Ok, how's that look? |
perfect, can you confirm this fixes the bug on react-native? |
Yup, the error display goes away. |
Interesting. I returned |
There's something I don't understand then.
How is React Native different? I think we should use the same warning kind as |
…r-function-wrap Improve handling of React Native version warnings
Should be fixed in 1.0.1. |
Yeah, i figured that was the intention of the original |
Thanks guys! |
RE: warnings for PropTypes I actually think the red screen is what you get too. |
Using React Native, a disruptive error appears to warn about function/no-function for Provider in app root. It seems that the version check is failing as React.version is undefined in my React Native environment.
As these are just warnings, perhaps it's best to use console.warn rather than console.error? Or perhaps there is a better way to fix the version check?
{

"react": "^0.13.3",
"react-native": "^0.8.0",
"react-redux": "^1.0.0",
"redux": "^1.0.1",
"redux-thunk": "^0.1.0"
}