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

Add default implementations for blocks from AnimationsManager on iOS #4878

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

piaskowyk
Copy link
Member

Summary

This PR adds default instances for uninitialized blocks in AnimationManager on iOS. It helps avoid null exceptions in two cases:

  • When reloading during Layout Animations and Shared Transitions.
  • When someone has installed Reanimated but doesn't import anything from it. In this situation, these blocks will not be set, but due to swizzling in Screens, there is a possibility of calling some of these blocks.

Fixes #4836
Fixes:
Screenshot 2023-06-26 at 21 26 52

Test plan

  1. Run Example -> open [LA] Entering and Exiting with Layout -> click toggle -> press R in console
  2. Run example from v3.4.1 crash _clearAnimationConfigForTag #4836 (comment)

@piaskowyk piaskowyk added this pull request to the merge queue Aug 4, 2023
Merged via the queue into main with commit 2a35369 Aug 4, 2023
4 checks passed
@piaskowyk piaskowyk deleted the @piaskowyk/add-default-blocks-ios branch August 4, 2023 10:03
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.

v3.4.1 crash _clearAnimationConfigForTag
2 participants