Skip to content

Add types for platform in React native web #53216

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

Closed
wants to merge 2 commits into from

Conversation

riteshshukla04
Copy link
Contributor

Summary:

This PR fixes #52356.

As per discussion here #52360 . We have changed the implementation in React native web in this PR necolas/react-native-web#2791.
As discussed with @cortinico , Now web returns a hardcoded string "0.0.0" for platform.version.
We can safely change this to string now.

Changelog:

[GENERAL][CHANGED] Update types for Platform.version

Test Plan:

N/A

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 11, 2025
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 11, 2025
@cortinico cortinico requested a review from necolas August 13, 2025 10:43
@facebook-github-bot
Copy link
Contributor

@necolas has imported this pull request. If you are a Meta employee, you can view this in D80173301.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 14, 2025
@facebook-github-bot
Copy link
Contributor

@necolas merged this pull request in f6ba2db.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @riteshshukla04 in f6ba2db

When will my fix make it into a release? | How to file a pick request?

@@ -162,7 +162,7 @@ type MacOSPlatform = {
type WebPlatform = {
OS: 'web',
// $FlowFixMe[unsafe-getters-setters]

Choose a reason for hiding this comment

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

Are these still needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web returns undefined for Platform.Version, but it is not optional
5 participants