Skip to content

Perform AnimationEndSync commits on the React revision#57493

Open
j-piasecki wants to merge 1 commit into
react:mainfrom
j-piasecki:export-D111219420
Open

Perform AnimationEndSync commits on the React revision#57493
j-piasecki wants to merge 1 commit into
react:mainfrom
j-piasecki:export-D111219420

Conversation

@j-piasecki

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [General][Fixed] Perform AnimationEndSync commits on the React revision

                    AB        Merge
UI thread -----------*----------*------------

JS thread ---*------------*------------------
           React       abFlush

In this scenario:

  • AB - Animation Backend update
  • React - React commit
  • Merge - Merge commit
  • abFlush - Animation Backend flush
  1. React revision captures the currently mounted main revision and applies the update on top of it. The result becomes the new reactRevision.
  2. Animation Backend performs updates on the mounted tree, and requests a flush
  3. The flush runs on the JS thread, clearing the animatedPropsRegistry
  4. Merge commit runs, mounting the reactRevision and effectively dropping the updates.

This diff changes the flush to happen on the react revision instead, preventing this from happening.

Differential Revision: D111219420

Summary:
Changelog: [General][Fixed] Perform AnimationEndSync commits on the React revision

```
                    AB        Merge
UI thread -----------*----------*------------

JS thread ---*------------*------------------
           React       abFlush
```

In this scenario:
- AB - Animation Backend update
- React - React commit
- Merge - Merge commit
- abFlush - Animation Backend [flush](https://www.internalfb.com/code/fbsource/[aecb908843884d2fe57e866611a468e47b36518b]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp?lines=242-268)

1. React revision captures the currently mounted main revision and applies the update on top of it. The result becomes the new `reactRevision`.
2. Animation Backend performs updates on the mounted tree, and requests a flush
3. The flush runs on the JS thread, clearing the `animatedPropsRegistry`
4. Merge commit runs, mounting the `reactRevision` and effectively dropping the updates.

This diff changes the flush to happen on the react revision instead, preventing this from happening.

Differential Revision: D111219420
@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 Jul 9, 2026
@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Jul 9, 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. 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