Skip to content

Schedule React revision merge to happen before dispatching events (#56449)#56449

Closed
j-piasecki wants to merge 1 commit intofacebook:mainfrom
j-piasecki:export-D100966623
Closed

Schedule React revision merge to happen before dispatching events (#56449)#56449
j-piasecki wants to merge 1 commit intofacebook:mainfrom
j-piasecki:export-D100966623

Conversation

@j-piasecki
Copy link
Copy Markdown
Contributor

@j-piasecki j-piasecki commented Apr 15, 2026

Summary:

Changelog: [ANDROID][FIXED] Schedule React revision merge to happen on DISPATCH_UI choreographer queue, before dispatching events

Before the introduction of branching, it was possible to handle synchronous events on the same frame they were dispatched. Introduction of branching broke that because merge was scheduled using runOnUIThread, which turned out to be after the DISPATCH_UI choreographer phase, thus after the dispatch of events.

Reviewed By: rubennorte

Differential Revision: D100966623

@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 D100966623.

@facebook-github-tools facebook-github-tools bot added p: Software Mansion Partner: Software Mansion Partner labels Apr 15, 2026
@facebook-github-tools facebook-github-tools bot added the p: Facebook Partner: Facebook label Apr 15, 2026
@meta-codesync meta-codesync bot changed the title Schedule React revision merge to happen before dispatching events Schedule React revision merge to happen before dispatching events (#56449) Apr 15, 2026
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Apr 15, 2026
…cebook#56449)

Summary:

Changelog: [ANDROID][FIXED] Schedule React revision merge to happen on `DISPATCH_UI` choreographer queue, before dispatching events

Before the introduction of branching, it was possible to handle synchronous events on the same frame they were dispatched. Branching broke that in two ways:
1. Merge was always scheduled on the end of the event loop (addressed by the previous diff)
2. Merge was scheduled using `runOnUIThread`, which turned out to be after the `DISPATCH_UI` choreographer phase, thus after the dispatch of events.

Differential Revision: D100966623
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Apr 15, 2026
…cebook#56449)

Summary:

Changelog: [ANDROID][FIXED] Schedule React revision merge to happen on `DISPATCH_UI` choreographer queue, before dispatching events

Before the introduction of branching, it was possible to handle synchronous events on the same frame they were dispatched. Introduction of branching broke that because merge was scheduled using `runOnUIThread`, which turned out to be after the `DISPATCH_UI` choreographer phase, thus after the dispatch of events.

Differential Revision: D100966623
…cebook#56449)

Summary:

Changelog: [ANDROID][FIXED] Schedule React revision merge to happen on `DISPATCH_UI` choreographer queue, before dispatching events

Before the introduction of branching, it was possible to handle synchronous events on the same frame they were dispatched. Introduction of branching broke that because merge was scheduled using `runOnUIThread`, which turned out to be after the `DISPATCH_UI` choreographer phase, thus after the dispatch of events.

Reviewed By: rubennorte

Differential Revision: D100966623
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @j-piasecki in b63efbf

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

@react-native-bot react-native-bot added the Merged This PR has been merged. label Apr 15, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 15, 2026

This pull request has been merged in b63efbf.

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 Merged This PR has been merged. 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.

2 participants