Skip to content

Merge promoted React revision immediately when on the main thread#56448

Closed
j-piasecki wants to merge 2 commits intofacebook:mainfrom
j-piasecki:export-D100942119
Closed

Merge promoted React revision immediately when on the main thread#56448
j-piasecki wants to merge 2 commits intofacebook:mainfrom
j-piasecki:export-D100942119

Conversation

@j-piasecki
Copy link
Copy Markdown
Contributor

Summary:
Changelog: [GENERAL][FIXED] When a React revision is being promoted on the main thread, merge it immediately instead of scheduling a rendering update

In the current implementation, when React is committing on the main thread, the merge is scheduled at the end of the event loop anyway. This change breaks synchronous events if they cause another render. Instead of merging the new tree immediately, it was scheduled, resulting in a visible flash of an incorrect state.

Differential Revision: D100942119

Differential Revision: D99996552
Summary:
Changelog: [GENERAL][FIXED] When a React revision is being promoted on the main thread, merge it immediately instead of scheduling a rendering update

In the current implementation, when React is committing on the main thread, the merge is scheduled at the end of the event loop anyway. This change breaks synchronous events if they cause another render. Instead of merging the new tree immediately, it was scheduled, resulting in a visible flash of an incorrect state.

Differential Revision: D100942119
@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 Apr 15, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 15, 2026

@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100942119.

@facebook-github-tools facebook-github-tools bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Apr 15, 2026
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Apr 15, 2026
…cebook#56448)

Summary:

Changelog: [GENERAL][FIXED] When a React revision is being promoted on the main thread, merge it immediately instead of scheduling a rendering update

In the current implementation, when React is committing on the main thread, the merge is scheduled at the end of the event loop anyway. This change breaks synchronous events if they cause another render. Instead of merging the new tree immediately, it was scheduled, resulting in a visible flash of an incorrect state.

Differential Revision: D100942119
@j-piasecki j-piasecki closed this Apr 15, 2026
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. fb-exported meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant