SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 155 C++

fix: make it possible to add multiple mountingOverrideDelegates (#44927)

Summary:
PR changing the single mountingOverrideDelegate to a vector of those, so other listeners can operate on the transaction. Used by `react-native-screens` in https://github.com/software-mansion/react-native-screens/pull/2134 and `react-native-reanimated` in https://github.com/software-mansion/react-native-reanimated/pull/6055.

Till now, only one listener could be added there, meaning that e.g. `Layout Animations` from `react-native`,  `Layout Animations` from `react-native-reanimated` and listening for `Screen` removal in `react-native-screens` could not operate at the same time.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [FIXED] - Add option for multiple `mountingOverrideDelegates`

Pull Request resolved: https://github.com/facebook/react-native/pull/44927

Test Plan: The code of `LayoutAnimations` inside `react-native` should work the same since it will add just one listener then. For other cases, different libraries can read/mutate transactions.

Reviewed By: javache

Differential Revision: D58530278

Pulled By: sammy-SC

fbshipit-source-id: d6305963621000be11d51a50cffff64526cca934
W
Wojciech Lewicki committed
358fe46969654932e73af94127c05e6ce5ed7049
Parent: 9093f6f
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 6/14/2024, 5:22:32 PM