-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
define propTypes for compatibility #1543
Comments
Would you mind sharing which libraries this is? I think that the correct course is to send PRs to them |
I recall that react-native-swipeout was affected, and others also. It's gonna be quite hard to push the removal of propTypes to those libraries as long as the latest react-native still provides them. |
I am currently dealing with it with https://github.com/archriss/react-native-snap-carousel |
React Native is going to stop exporting prop types so libraries should stop depending on them. I don't plan to add them back to RNfW |
@necolas where does this information come from? As far as I known it's just about |
Hey @mo22, I like your workaround. On which file are you adding this ?
|
Hi,
a lot of react-native libraries use ReactNative.Text.propTypes.style or ReactNative.ViewPropTypes to define their own propTypes.
I know that propTypes are deprecated, but right now this causes a lot of "cannot read property style of undefined" errors with third party libraries.
My workaround is to monkey patch the prop types:
I wonder if it makes sense to have the propTypes still defined by react-native-web for better user experience or just wait until propTypes are removed from the third party libraries.
Cheers
Mo
The text was updated successfully, but these errors were encountered: