Skip to content

feat: Add missing ReactNativeVersion API - #5238

Merged
Simek merged 1 commit into
react:mainfrom
retyui:feat/retyui/ReactNativeVersion-API
Sep 10, 2026
Merged

feat: Add missing ReactNativeVersion API#5238
Simek merged 1 commit into
react:mainfrom
retyui:feat/retyui/ReactNativeVersion-API

Conversation

@retyui

@retyui retyui commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

From React Native 0.82.x the ReactNativeVersion can be imported from 'react-native/index.js' module

Commit: react/react-native@ec5638a


The `ReactNativeVersion` API exposes the version of the resolved `react-native` package on JS side. Apps and libraries can use it to check compatibility or enable version-specific behavior.

> ℹ️Note: Also we have [`Platform.constants.reactNativeVersion`](platform#constants) in our public API already. **However**, this is the per-platform _**native-reported**_ React Native version.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use Docusuaurs admonition here, instead of quote:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a note admonition

Comment thread docs/reactnativeversion.md Outdated
Comment on lines +41 to +44
| Type |
| ------ |
| number |

@Simek Simek Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeating type in tables seems redundant in this case. It makes more sense when the value has a more complex type like object, refers to external type, or types/values depends on the platform.

Screenshot 2026-09-10 at 16 25 33

Let's remove the tables for this API from all files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all were removed

@retyui
retyui force-pushed the feat/retyui/ReactNativeVersion-API branch from d2bf874 to d79ad65 Compare September 10, 2026 16:37
@retyui
retyui requested a review from Simek September 10, 2026 16:37
@retyui
retyui force-pushed the feat/retyui/ReactNativeVersion-API branch from d79ad65 to 9fbcb1f Compare September 10, 2026 16:52

@Simek Simek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a missing doc page and all the updates! 🚀

@Simek
Simek merged commit 87aac33 into react:main Sep 10, 2026
8 checks passed
@retyui

retyui commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for adding a missing doc page and all the updates! 🚀

Thank you for the quick review of the PRs! Much appreciated.

@retyui
retyui deleted the feat/retyui/ReactNativeVersion-API branch September 10, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants