Skip to content

[DevTools] Allow renaming Host Component props#35735

Merged
eps1lon merged 1 commit intofacebook:mainfrom
eps1lon:sebbie/02-09-_devtools_allow_renaming_host_component_props
Feb 9, 2026
Merged

[DevTools] Allow renaming Host Component props#35735
eps1lon merged 1 commit intofacebook:mainfrom
eps1lon:sebbie/02-09-_devtools_allow_renaming_host_component_props

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Feb 9, 2026

Summary

Renaming props only considered Fibers without an instance (e.g. Function Components) and Class Components. However, Host Components have an instance but don't implement forceUpdate thus crashing the frontend. Now we only use forceUpdate for Class Components like we do in all the other places where we use forceUpdate. Otherwise we use overridePropsRenamePath regardless of the instance which allows renaming props of Host Components.

Found with Claude + Opus 4.6

How did you test this change?

  • Added test

@meta-cla meta-cla bot added the CLA Signed label Feb 9, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Feb 9, 2026
@eps1lon eps1lon requested a review from hoxyq February 9, 2026 22:07
@eps1lon eps1lon marked this pull request as ready for review February 9, 2026 22:07
Copy link
Contributor

@hoxyq hoxyq left a comment

Choose a reason for hiding this comment

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

Surprised that this wasn't reported

@eps1lon eps1lon merged commit 6a939d0 into facebook:main Feb 9, 2026
243 checks passed
@eps1lon eps1lon deleted the sebbie/02-09-_devtools_allow_renaming_host_component_props branch February 9, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants