react-native-snap-carousel icon indicating copy to clipboard operation
react-native-snap-carousel copied to clipboard

TypeError: Cannot read property 'style' of undefined

Open devudr opened this issue 3 months ago • 2 comments

using RN 0.81.1

devudr avatar Sep 23 '25 05:09 devudr

You should just patch the package by changing these three files : node_modules/react-native-snap-carousel/src/carousel/Carousel.js , node_modules/react-native-snap-carousel/src/pagination/Pagination.js , node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js

and instead of importing ViewPropTypes from 'react native' , import it from deprecated-react-native-prop-types. Then run

yarn patch-package react-native-snap-carousel rebuild and it will fix the issue

YassineOujaa77 avatar Sep 23 '25 13:09 YassineOujaa77

You should just patch the package by changing these three files : node_modules/react-native-snap-carousel/src/carousel/Carousel.js , node_modules/react-native-snap-carousel/src/pagination/Pagination.js , node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js

and instead of importing ViewPropTypes from 'react native' , import it from deprecated-react-native-prop-types. Then run

yarn patch-package react-native-snap-carousel rebuild and it will fix the issue

Thanks. it works. Just, I think one more file to patch is node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js

yosefkurniawan avatar Oct 09 '25 04:10 yosefkurniawan