R
R
RZ2020-11-05 18:45:14
React
RZ, 2020-11-05 18:45:14

It seems to me that I encountered a BUG?

Today I encountered a strange thing.
I was doing a simple `fadeIn` animation and found that it behaved strangely. I created an online example.

https://codesandbox.io/s/wonderful-mccarthy-hhjws?...

At the top of the page you will see a button (switch). Try clicking it a few times and you'll see the animation fire once, now remove the `header` html component on line 57 and then try clicking the button again.

Why is this happening?

The `header` component contains a simple rotate animation. Is this what is happening? In any case, it seems to me that something is wrong.

PS Everything works fine if you replace line 15 with this code `setTimeout (() => (containerElm.style.opacity = shown?" 1 ":" 0 "), 50);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question