renatorib / react-powerplug

:electric_plug: Renderless Containers
https://renatorib.github.io/react-powerplug
MIT License
2.68k stars 101 forks source link

Changing state causes rerender that breaks animations #191

Open cdfa opened 4 years ago

cdfa commented 4 years ago

Hi, I am trying to use the <Toggle> container to control the animation of a component, but the animations snaps between start and end instead of actually animating. This seems to be due to the children of the <Toggle> being completely re-rendered, instead of receiving new prop values.

I think styleguidist had a similar issue: https://github.com/styleguidist/react-styleguidist/issues/51

If you want I can provide a reproduction repo, but the setup is a little complicated.