reactjs / react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM
https://reactcommunity.org/react-transition-group/
Other
10.1k stars 652 forks source link

forceReflow sometimes causes a flash of transition on page reload. #899

Open ScottDowne opened 5 months ago

ScottDowne commented 5 months ago

What is the current behavior?

With side panel transition that is by default closed, on hard refresh of the page it looks to his forceReflow some of the time, and this causes the panel that should be hidden until the user interacts with it, to instead show and quickly transition to the hidden state.

What is the expected behavior?

Ideally this would default to the hidden state and not show a transition on page refresh.

Could you provide a CodeSandbox demo reproducing the bug?

Steps to test and more info in our bug tracker here.

This is used in Firefox's newtab page, so to test open a newtab page in Firefox. If you go there, and do a hard refresh (Shift+home button), or (ctrl+F5) should do the trick. Do the hard refresh a couple of times, and you should see the personalize panel on the right open then close enough of the time.