Open sbefort opened 3 years ago
I achieved a similar effect in a project using the React Transition Group package. http://reactcommunity.org/react-transition-group/css-transition
Hope it helps!
Sandbox: https://codesandbox.io/s/friendly-goldstine-v5x43?file=/src/index.js For me it works just as expected - when clicked the switch changes position and turns grey, all smoothly animated. Could someone fork the sandbox/describe how to see the issue?
If you click on the switch and disable it immediately through a state update, it should still animate to the on/off positions while disabled. Instead, there is a white flash until the phantom animation completes, then it's put in a disabled status and appears again.