fix: make LayoutAnimation.configureNext work alongside Reanimated layout animations#9900
Closed
tomekzaw wants to merge 1 commit into
Closed
fix: make LayoutAnimation.configureNext work alongside Reanimated layout animations#9900tomekzaw wants to merge 1 commit into
tomekzaw wants to merge 1 commit into
Conversation
…out animations Reanimated takes over UIManager's single animation delegate slot (needed to receive stopSurface) and swallowed uiManagerDidConfigureNextLayoutAnimation, so React Native's LayoutAnimation.configureNext silently did nothing and its success callback never fired. Reanimated now owns an instance of core's LayoutAnimationDriver, forwards the UIManagerAnimationDelegate calls to it, registers it as an additional chained MountingOverrideDelegate ahead of the Reanimated proxy, and drives its frames from the existing requestRender loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
See #9901. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With Reanimated installed, React Native's LayoutAnimation.configureNext silently does nothing and its success callback never fires. Reanimated takes over UIManager's single animation delegate slot (it needs the stopSurface callback) and stubs out the remaining UIManagerAnimationDelegate methods, so the config is swallowed and the animation tick path is dead.
This PR makes both layout animation systems work together, with no changes to React Native:
Side effect: on Android, configureNext now works with Reanimated installed even though stock RN gates it behind enableLayoutAnimationsOnAndroid (default off).
Known limitation: a view driven by both systems in the same commit double-animates for that commit — use one system per view.
Test plan
Open the new example: fabric-example → [LA] LayoutAnimation.configureNext compatibility (iOS and Android).
🤖 Generated with Claude Code