Skip to content

Remove the TextInput fontWeight number conversion from JS - #60147

Draft
intergalacticspacehighway wants to merge 1 commit into
textinput-font-weight-cppfrom
textinput-font-weight-js
Draft

intergalacticspacehighway wants to merge 1 commit into
textinput-font-weight-cppfrom
textinput-font-weight-js

Conversation

@intergalacticspacehighway

Copy link
Copy Markdown
Collaborator

Land after #60136 ships in a release.

Summary:

TextInput.js changes a numeric fontWeight to a string, because the Android native code accepted only a string. #60136 makes the native code accept a number, so this PR removes the JS conversion. iOS already parses a numeric fontWeight in C++.

Changelog:

[GENERAL] [CHANGED] - TextInput no longer converts a numeric fontWeight to a string in JS.

Test Plan:

  • RNTester on the Android emulator, with Accept a numeric fontWeight in the Android TextInput native code #60136: a TextInput with a numeric fontWeight renders with no errors in each combination of the props flags (Props 1.5, Props 2.0, exclusive props updates, the C++ iterator setter).
  • RNTester on the iOS simulator: fontWeight: 700 renders the same as '700'.

@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 Nov 19, 2026

This branch has not been deployed

No deployments
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant