(Not sure this is a bug or intended behavior, so please let me know if it is intended.)
If layout is changed to true after mount, motion.div does not animate.
In case layout is set to true on mount, it does animate as expected.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
1. Read the FAQs 👇 check
2. Describe the bug
(Not sure this is a bug or intended behavior, so please let me know if it is intended.) If
layout
is changed totrue
after mount,motion.div
does not animate. In caselayout
is set totrue
on mount, it does animate as expected.3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/framer-virtual-hgzcgz?file=%2Fsrc%2FApp.tsx%3A9%2C11
4. Steps to reproduce
layout
prop settrue
for next items.5. Expected behavior Items animate for layout changes even if
layout
prop is changed totrue
dynamically.6. Video or screenshots
https://github.com/framer/motion/assets/99154189/75f3d441-160c-4e8c-9fb6-b05fc6787bd9
7. Environment details
If applicable, let us know which OS, browser, browser version etc you're using.