I couldn’t find the fix for this error anywhere in the
react-native-snap-carousel package, and it was really frustrating.
Eventually, I solved it and I hope my quick fix helps other frustrated developers. If you have a better solution, please let me know.
(1) Install react-style-proptype
(2) Open the following files in the node_modules folder once you’ve installed
react-style-proptype , as prescribed by the documentation, in each file mentioned above.
(4) Replace all instances of
ViewPropTypes ? ViewPropTypes.style : View.propTypes.style with
(5) Delete the
ViewPropTypes named import from
Voila! Hopefully, this works for you too. If this helped, then please leave a like or comment. And once again, if you find a better solution, please let me know.