react-native-root-toast icon indicating copy to clipboard operation
react-native-root-toast copied to clipboard

Not compatible with latest versions of React Native Web

Open haveamission opened this issue 5 years ago • 3 comments
trafficstars

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,

haveamission avatar Nov 22 '20 01:11 haveamission

Here's more info on the change and a suggested workaround: https://github.com/oblador/react-native-collapsible/pull/384#issue-549362196

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.

rsml avatar Mar 08 '21 08:03 rsml

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?

elGatoMantocko avatar Oct 08 '21 23:10 elGatoMantocko

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

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

mmomtchev avatar May 14 '22 12:05 mmomtchev