Got this error when I added
import Carousel from 'react-native-snap-carousel'
React Native 0.42.0 and React 15.4.1
I'm a beginner with RN, can anybody help me?
Thanks.
Just encountered the same issue and managed to work around it by upgrading to React Native v0.44.x. I think you'll need to update your React version as well. Check out the React Native upgrade guide for help with your specific setup.
See also this related issue: facebook/react-native#14032
thanks @stuharvey ! upgrading to RN 0.44.3 fixed the problem.
Thanks @stuharvey, that's what I was thinking.
However upgrading break some of my other plugins. I will try to sort it out.
I can confirm that upgrading to React Native 0.45.1 and React 16 solved the issue.
also you can use "react-native-snap-carousel": "2.1.1",
Are you guys saying that react-native-snap-carousel 2.3 min version is React Native 0.43?
I couldn't find the min version for ~2.0 on any place.
@oximer This commit introduced retro-compatibility with older versions of React Native, but it was published in 3.0.0.
I will see about publishing a new 2.4.x release that includes this commit. Note that 2.2.2 shouldn't trigger the ViewPropTypes error.
Is there a particular reason why you want to stay with the 2.x version? Because a lot has happened since then ;-)
@oximer I've just pushed a new branch v2.4.1-retrocompatibility that includes the fix for older versions of React Native.
Can you try it and let me know if it works for you?
@bd-arc I'm stucked on React Native version 0.41.2
It seems that your version 3.0 and above is only compatible with 0.43.0 or above, right?
@oximer Yes, because it relies on a component introduced in React Native 0.43.0.
Have you tried the aforementioned branch to see if it solves the issue for you?
Most helpful comment
thanks @stuharvey ! upgrading to RN 0.44.3 fixed the problem.