React-native-snap-carousel: Cannot read property 'style' of undefined

Created on 8 Nov 2020  Â·  7Comments  Â·  Source: meliorence/react-native-snap-carousel

This error is found in the demo provided at
https://snack.expo.io/@bd-arc/react-native-snap-carousel-%7C-example-with-custom-interpolations

I see the same issue in my own code.

Most helpful comment

Run the Application on mobile not desktop web

Sure, @Lovej4972! No problem when running on mobile. We'd like to get it working on desktop too though, since many of us use Expo, and we'd like to run the app as a web app from the same codebase.

All 7 comments

Running fine on Android though. The error is raised in web only

TypeError: Cannot read property 'style' of undefined

node_modules/react-native-pages/src/components/indicator/index.js:9
   6 | 
   7 | export default class Indicator extends PureComponent {
   8 |   static propTypes = {
>  9 |     style: ViewPropTypes.style,
  10 | 
  11 |     pages: PropTypes.number.isRequired,
  12 |     progress: PropTypes.instanceOf(Animated.Value).isRequired,
npm install [email protected] --global
expo init project
npm i -S react-native-snap-carousel
npm i -S @types/react-native-snap-carousel

and useing react-native-snap-carousel then error this. (web)

👀

Similar error for me on web only. Works fine on android device.
TypeError: Cannot read property 'style' of undefined

Module.../../../react-native-snap-carousel/src/carousel/Carousel.js
> 46 | containerCustomStyle: ViewPropTypes ? ViewPropTypes.style : View.propTypes.style,

Hey! Any fixes for this?

Run the Application on mobile not desktop web

On Sat, Dec 26, 2020, 6:42 AM Shwetank Shrey <[email protected]
wrote:

Hey! Any fixes for this?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/archriss/react-native-snap-carousel/issues/779#issuecomment-751321115,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMHCE2VZF5SAIZQRHRQ24RLSWVZTNANCNFSM4TOR4FIA
.

Run the Application on mobile not desktop web

Sure, @Lovej4972! No problem when running on mobile. We'd like to get it working on desktop too though, since many of us use Expo, and we'd like to run the app as a web app from the same codebase.

Was this page helpful?
0 / 5 - 0 ratings