-
Notifications
You must be signed in to change notification settings - Fork 270
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
Update react-native types to comply to RN 0.72 #890
Conversation
e96bc53
to
92c3645
Compare
@fortmarek @naqvitalha FYI this PR might affect which RN versions the library supports, given that users might run into TS issues in case they haven't upgraded. We should carefully consider this before releasing it into the wild. |
version "0.67.6" | ||
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.6.tgz#9a7de5feba6065aec9f44f9a1e8f6e55ee5d015c" | ||
integrity sha512-NM6atxrefIXMLE/PyQ1bIQjQ/lWLdls3uVxItzKvNUUVZlGqgn/uGN4MarM9quSf90uSqJYPIAeAgTtBTUjhgg== | ||
"@types/react-native@0.72.2": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can remove this dependency completely now that react-native
ships with types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to do that, we'd need to declare react-native
as a devDependency instead. It's a more future-proof alternative, I believe, as I'm not really sure how long the @types/react-native
lib will be actively maintained now that we have official support for TS in the original repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this PR, it should be fine as-is, I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a more future-proof alternative, I believe, as I'm not really sure how long the @types/react-native lib will be actively maintained now that we have official support for TS in the original repo.
IIRC, that dependency will no longer be updated from 0.73 onwards. I agree we can keep as-is for this PR, though.
To avoid breakage, instead of reusing the RN types, we can change the type to correspond to the new one. Or is the type change itself a breaking change? |
@fortmarek it really depends on how far we want to go with backwards compatibility. The updated types are more permissive in this case (they add the |
If that's the case, I'd ship this. While we don't have an official support window, I don't think we should try to support really old RN versions. |
Description
react-native
types shipped as part of0.72
.Reviewers’ hat-rack 🎩
No actual changes are being shipped as part of it, except for type changes.
Screenshots or videos (if needed)
N/A
Checklist