react-native/packages
Tim Yung 316170ce8d RN: Enable useInsertionEffectsForAnimations (#47595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47595

Enables the `useInsertionEffectsForAnimations` feature flag by default. This changes `useAnimatedProps` to enqueue updates to the `AnimatedNode` graph in `useInsertionEffect` instead of `useLayoutEffect`.

The main motivation for `useInsertionEffect` is to avoid unmounting `AnimatedNode` graphs when an `Activity` subtree becomes hidden.

Both `useInsertionEffect` and `useLayoutEffect` occur during the commit phase. Although they occur at different moments in the commit phase, the different is difficult to observe and unlikely to impact product code.

One observable impact is that with `useInsertionEffect`, animations can now be started from layout effects.

Changelog:
[General][Changed] - The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects.

Reviewed By: mdvacca

Differential Revision: D65906157

fbshipit-source-id: d09b2f1b76079eecafbed8c6f5d8ee4695a1f81c
2024-11-13 16:29:32 -08:00
..
assets
babel-plugin-codegen
community-cli-plugin
core-cli-utils
debugger-frontend Update debugger-frontend from ff343d8...b61aae3 (#47593) 2024-11-13 11:27:38 -08:00
dev-middleware
eslint-config-react-native
eslint-plugin-react-native
eslint-plugin-specs
gradle-plugin
helloworld Let lib maintainer be explicit with componentProvider mapping (#47520) 2024-11-12 07:38:03 -08:00
hermes-inspector-msggen
metro-config
normalize-color
polyfills
react-native RN: Enable useInsertionEffectsForAnimations (#47595) 2024-11-13 16:29:32 -08:00
react-native-babel-preset
react-native-babel-transformer
react-native-bots
react-native-codegen feat: handle negative values in enums (#47452) 2024-11-13 12:20:16 -08:00
react-native-codegen-typescript-test
react-native-info
react-native-popup-menu-android
react-native-test-library Let lib maintainer be explicit with componentProvider mapping (#47520) 2024-11-12 07:38:03 -08:00
react-native-test-renderer
rn-tester feat(text-input): [iOS] inputAccessoryViewButtonLabel prop (#47441) 2024-11-13 06:44:23 -08:00
typescript-config
virtualized-lists