3 ms·
This is possible to fix but probably not by using Resize/MutationObservers (as the library does) In Framer Motion we use React's layout effect to trigger the <m
by mattgperry 4y ago
This is possible to fix but probably not by using Resize/MutationObservers (as the library does)
In Framer Motion we use React's layout effect to trigger the <motion.div layout /> animations (which are equivalent to this). The layout effect runs synchronously after DOM mutation and works cross-browser.
https://codesandbox.io/s/framer-motion-reorder-animation-bviz6?file=/src/Example.tsx https://codesandbox.io/s/framer-motion-reorder-animation-bvi...
I don't trust the implementation of observers, usually in Safari, to reliably recreate this effect. I'm not sure it's even specced.