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

Not compatible with latest versions of React Native Web #134

Open
haveamission opened this issue Nov 22, 2020 · 3 comments
Open

Not compatible with latest versions of React Native Web #134

haveamission opened this issue Nov 22, 2020 · 3 comments

Comments

@haveamission
Copy link

i am getting this error due to deprecated prop types:

TypeError: Cannot read property 'style' of undefined

  64 | static propTypes = {
  65 |     ...ViewPropTypes,
> 66 |     containerStyle: ViewPropTypes.style,
     | ^  67 |     duration: PropTypes.number,
  68 |     visible: PropTypes.bool,
  69 |     position: PropTypes.number,
@rsml
Copy link

rsml commented Mar 8, 2021

Here's more info on the change and a suggested workaround: oblador/react-native-collapsible#384 (comment)

Side note: I'm working around this by dynamically only requiring react-native-root-toast when Platform.OS !== 'web'. Instead of showing the toast, I can settle for just calling window.alert(...) on web.

@elGatoMantocko
Copy link

I ran into this today following the expo docs for setting up cross-platform toasts. Is there any intention to release a fix at some point?

@mmomtchev
Copy link
Contributor

Until the PR is merged you can install from my repo:

npm i https://github.com/mmomtchev/react-native-root-toast#deprected-prop-types

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

4 participants