Skip to content

Perform AnimationEndSync commits on the React revision (#57493)#57493

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

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

Conversation

@j-piasecki

@j-piasecki j-piasecki commented Jul 9, 2026

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

@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
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-codesync meta-codesync Bot changed the title Perform AnimationEndSync commits on the React revision Perform AnimationEndSync commits on the React revision (#57493) Jul 9, 2026
@j-piasecki j-piasecki force-pushed the export-D111219420 branch from 45c2c03 to faf25f7 Compare July 9, 2026 12:59
@meta-codesync meta-codesync Bot closed this in 7d85522 Jul 14, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 14, 2026
@meta-codesync

meta-codesync Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been merged in 7d85522.

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

1 participant