facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
116.27k stars 23.99k forks source link

remove undefined behaviour when cancelling ongoing animation #44484

Open sammy-SC opened 1 week ago

sammy-SC commented 1 week ago

Summary: changelog: [internal]

Restarting animation state in componentWillUnmount may get the animation into inconsistent state, leading to broken behaviour. It is safe to restart the animation state inside of componentDidMount as this prepares the component when it is mounted.

Differential Revision: D57102842

facebook-github-bot commented 1 week ago

This pull request was exported from Phabricator. Differential Revision: D57102842