CSS responsiveness and animation

When the state changes, React will execute the reconciliation algorithm and completely restore parts of the DOM.

If I have an animation or CSS transition applied to a DOM node, how do React developers usually avoid interfering with the DOM during the animation (what can stop the animation)?

“It just works,” because developers only know to start the animation (for example, by adding or removing a class) when a certain part of the component’s life cycle is completed (for example, onComponentDidUpdate) - i.e. after they can be sure that no further changes to the DOM subtree will happen?

+4
source share
1 answer

" " Reacts dom. , , , shouldComponentUpdate , React .

+1

Source: https://habr.com/ru/post/1679589/


All Articles