Closed meowsus closed 3 years ago
@deanhet Totally happy to provide a different solution, but I've yet to be able to find out how to declare the prop types of a React Native style prop the right way.
I had no idea that propTypes were removed from react now so good catch. I'm also a huge fan of your commit messages.
I think it would be worth deleting all mention of propTypes instead. The any is just a hack and all of this can be and is documented in the readme / can be added in typescript
PropTypes removed!
Great! I think defaultProps should stay though, can you test your setup with defaultProps included? I'm worried about knock on effects that may have if we delete it.
Updated and tested. Seems to be working well.
Brilliant, thanks for that. Will merge and push a release later today.
Thanks for contributing!
Absolutely!
Related to #81, when trying to use this library with Expo, an error is thrown when importing. The library chokes on
Text.propTypes.style
. Admittedly I am not sure how to properly import PropTypes from React Native, as it seems that they have been deprecated, but regardless there is no reason I can think of as to why this library should not be considered compatible with Expo when an app is being previewed in web-mode.