-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Change React Native Version import to the one from Platform #3949
Conversation
Hi @svbutko, It definitely make sense to use the public documented export instead of the internal lib. Could you check why |
Hi @krystofwoldrich Checked the tests, and added a fix for potential missing constants (e.g. testing or going beyond supported platforms) Sometimes there's a failing |
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.
Thank you @svbutko!
It looks good now. 🚀
📢 Type of change
📜 Description
The import for selection of React Native version, both for type and value happens via JS constant, while there's an documented way to get it from
Platform
: https://reactnative.dev/docs/platform#constantsIt's also available in 0.65 which makes it work for all versions:
https://reactnative-archive-august-2023.netlify.app/docs/0.65/platform#constants
💡 Motivation and Context
While working with other repos than
react-native
likereact-native-tvos
orreact-native-web
with certain TS configs, there are issues like this one:This PR solves this import issue
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled🔮 Next steps