Skip to content
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

Uncaught TypeError: Cannot read property 'style' of undefined #176

Open
gbhasha opened this issue Mar 20, 2020 · 2 comments
Open

Uncaught TypeError: Cannot read property 'style' of undefined #176

gbhasha opened this issue Mar 20, 2020 · 2 comments

Comments

@gbhasha
Copy link

gbhasha commented Mar 20, 2020

When used with 'react-styleguidist' along with 'react-styleguidist' for documenting the react-native components, I got below error.

Uncaught TypeError: Cannot read property 'style' of undefined
at eval (webpack:///./demo/node_modules/react-native-slider/lib/Slider.js?:552)
at Object../demo/node_modules/react-native-slider/lib/Slider.js (main.bundle.js:4663)

The error is pointing to this line in Slider.js
image

my dependencies:

"react": "16.13.0",
"react-native": "0.61.5",
"react-styleguidist": "11.0.3",
"react-native-web": "0.12.2",
"webpack": "4.42.0",

@gbhasha
Copy link
Author

gbhasha commented Mar 20, 2020

Something related...
'ViewPropTypes' is not supported in 'react-native-web' v12.0 onwards
reactrondev/react-native-web-swiper#41

Suggested solution is to use PropTypes.shape()

@ianaz
Copy link

ianaz commented Aug 14, 2020

Same problem here, I'm going to try with PropTypes.shape(), thanks @gbhasha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants