facebook / react-strict-dom

React Strict DOM (RSD) standardizes the development of styled React components for web and native.
https://facebook.github.io/react-strict-dom
MIT License
3.19k stars 161 forks source link

fix(useStyleTransition): add an early return if we don't have anything to animate #226

Open ecreeth opened 1 month ago

ecreeth commented 1 month ago

Currently, we use the useStyleTransition hook every time useStyleProps is being used. No matter if the styles being evaluated don't include any transition at all.

This PR tries to solve the problem by adding an early return when we don't have any transition.

necolas commented 2 weeks ago

This will need rebasing. The unit tests are likely to fail due to a regression in coverage