Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy initalize layout aniamtions in the Commit Hook #6586

Conversation

bartlomiejbloniarz
Copy link
Contributor

@bartlomiejbloniarz bartlomiejbloniarz commented Oct 10, 2024

Summary

Since RN 0.76 the first surface is created after our initializeTurboModule method is called on iOS. This change is probably a result of this PR. This breaks our initialization of layoutAnimationsProxy_, so now we lazy initialize it for every surface in the Commit hook.

Test plan

Check if layout animations work in the fabric-example app.

@bartlomiejbloniarz bartlomiejbloniarz requested review from tomekzaw, tjzel and piaskowyk and removed request for tjzel October 10, 2024 13:46
@bartlomiejbloniarz bartlomiejbloniarz added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit 1f5d866 Oct 10, 2024
15 of 17 checks passed
@bartlomiejbloniarz bartlomiejbloniarz deleted the @bartlomiejbloniarz/fix-layout-animations-initialization branch October 10, 2024 17:09
github-merge-queue bot pushed a commit that referenced this pull request Oct 25, 2024
## Summary

This PR changes the way we keep track of the window dimensions in Layout
Animations on the New Arch. The previous version didn't work on Android
in release mode. This new approach is possible because we moved the
initialization of layout animations to the commit hook in #6586.

## Test plan

Check if Layout Animations dependent on `windowWidth` (e.g. SlideInLeft)
work properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants