react-lottie icon indicating copy to clipboard operation
react-lottie copied to clipboard

setDirection and setSpeed need to run on componentDidMount

Open nlfonseca opened this issue 7 years ago • 2 comments

Hello,

setDirection() and setSpeed() runs only on componentDidUpdate() and needs to run also on componentDidMount() if we want that default direction is -1 for example.

nlfonseca avatar Jan 18 '18 15:01 nlfonseca

YES THIS. Seriously this was driving me NUTS. I do it on the wrapper now. But it's insane this isn't supported.

spsDrop avatar Mar 22 '19 22:03 spsDrop

Here is an example of a simple fix around.

https://codesandbox.io/embed/powmy7llx

spsDrop avatar Mar 22 '19 22:03 spsDrop