K
K
KnightForce2017-10-01 22:55:36
Animation
KnightForce, 2017-10-01 22:55:36

js animation for React?

I would like to use libraries for animation in JS (not CSS).
If I get a reference to an element via ref and animate the DOM element or animate via the style object, is this normal practice or is there something better?
And when re-rendering, won't the consequences of the animation be reset (for example, the style of the DOM element)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kuper132, 2017-10-01
@Kuper132

Tried React CSS Transitions?
https://www.npmjs.com/package/react-css-transition

F
Frimko, 2017-10-02
@Frimko

for complex animation usually use https://github.com/chenglou/react-motion

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question