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

PropTypes are deprecated (and make the library crash with react-native-web) #500

Open
alessiocancian opened this issue Apr 9, 2021 · 3 comments

Comments

@alessiocancian
Copy link

This library uses deprecated propTypes from react-native which aren't exported by react-native-web (necolas/react-native-web#1543).

As a result when trying to use react-native-material-ui on web I got this error:

Uncaught TypeError: Cannot read property 'style' of undefined
   at eval(webpack-internal:///./node_modules/react-native-material-ui/src/IconToggle/IconToggle.react.js)
   at Object../node_modules/react-native-material-ui/src/IconToggle/IconToggle.react.js
   ....

I'm sending a PR with the patch I used to fix it...

alessiocancian pushed a commit to alessiocancian/react-native-material-ui that referenced this issue Apr 9, 2021
@samaneh-kamalian
Copy link

This library uses deprecated propTypes from react-native which aren't exported by react-native-web (necolas/react-native-web#1543).

As a result when trying to use react-native-material-ui on web I got this error:

Uncaught TypeError: Cannot read property 'style' of undefined
   at eval(webpack-internal:///./node_modules/react-native-material-ui/src/IconToggle/IconToggle.react.js)
   at Object../node_modules/react-native-material-ui/src/IconToggle/IconToggle.react.js
   ....

I'm sending a PR with the patch I used to fix it...

same problem!

@samaneh-kamalian
Copy link

Excuse me, I have a serious problem with this. Is there no solution?

@alessiocancian
Copy link
Author

Excuse me, I have a serious problem with this. Is there no solution?

Yes, you can patch the package using patch-package, see my PR with the fix

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