-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Expose ReactNativeVersion API #52784
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
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D78806347 |
|
Summary: Resolves react-native-community/discussions-and-proposals#893 (comment). **Changes** - Formalises the design of `ReactNativeVersion` as a single object and adds a `getVersionString` accessor. - Expose `ReactNativeVersion` as a root export on `index.js`. - Update deep imports use in `NewAppScreen`. **Notes** - Subtly, we also have `Platform.constants.reactNativeVersion` in our public API already. **However**, this is the per-platform ***native-reported*** RN version, distinct from the JS version (this diff). See [`ReactNativeVersionCheck.js`](https://github.com/facebook/react-native/blob/54d733311d87e9ab4e18f947edf3f5c85f9a6275/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js#L24). Changelog: [General][Added] - Expose `ReactNativeVersion` API as JavaScript root export Differential Revision: D78806347
|
This pull request was exported from Phabricator. Differential Revision: D78806347 |
|
This pull request has been merged in ec5638a. |
|
This pull request was successfully merged by @huntie in ec5638a When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: facebook#52784 Resolves react-native-community/discussions-and-proposals#893 (comment). **Changes** - Formalises the design of `ReactNativeVersion` as a single object and adds a `getVersionString` accessor. - Expose `ReactNativeVersion` as a root export on `index.js`. - Update deep imports use in `NewAppScreen`. **Notes** - Subtly, we also have `Platform.constants.reactNativeVersion` in our public API already. **However**, this is the per-platform ***native-reported*** RN version, distinct from the JS version (this diff). See [`ReactNativeVersionCheck.js`](https://github.com/facebook/react-native/blob/54d733311d87e9ab4e18f947edf3f5c85f9a6275/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js#L24). Changelog: [General][Added] - Expose `ReactNativeVersion` API as JavaScript root export Reviewed By: cortinico Differential Revision: D78806347 fbshipit-source-id: 974251fdaa9ab18fac8a584644fea894e4f6e083
Summary:
Resolves react-native-community/discussions-and-proposals#893 (comment).
Changes
ReactNativeVersionas a single object and adds agetVersionStringaccessor.ReactNativeVersionas a root export onindex.js.NewAppScreen.Notes
Platform.constants.reactNativeVersionin our public API already. However, this is the per-platform native-reported RN version, distinct from the JS version (this diff). SeeReactNativeVersionCheck.js.Changelog:
[General][Added] - Expose
ReactNativeVersionAPI as JavaScript root exportDifferential Revision: D78806347