dillon1000/react

Commit

Add Clean Up Callbacks to View Transition and Gesture Transition Events (#35564)

Stacked on #35556 and #35559.

Given that we don't automatically clean up all view transition
animations since #35337 and browsers are buggy, it's important that you
clean up any `Animation` started manually from the events. However,
there was no clean up function for when the View Transition is forced to
stop. This also makes it harder to clean up custom timers etc too.

This lets you return a clean up function from all the events on
`<ViewTransition>`.
Browse files
Changed paths10 files
First-parent comparison
M fixtures/view-transition/src/components/Page.js ModifiedM packages/react-art/src/ReactFiberConfigART.js ModifiedM packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigNative.js ModifiedM packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberConfigWithNoMutation.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/forks/ReactFiberConfig.custom.js ModifiedM packages/react-test-renderer/src/ReactFiberConfigTestHost.js ModifiedM packages/shared/ReactTypes.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…