1. Describe the bug
Children components wrapped in AnimatePresence don't stagger as they should if they are not rendered initially. In provided example, you can see a comparison between child components mapped initially from static data array (works fine) and rendered conditionally, e.g. after some remote data is fetched, which is a common scenario.
2. CodeSandbox reproduction of the bug
https://codesandbox.io/s/staggerchildrenissue-tkkie?file=/src/App.js
3. Steps to reproduce
Refresh provided codesandbox example.
4. Expected behavior
Children components rendered conditionally should be staggered the same as the ones rendering initially.
5. Environment details
KDE neon 5.19, Chrome 85.0.4183.102 (Official Build) (64-bit)
1. Describe the bug
Children components wrapped in
AnimatePresencedon't stagger as they should if they are not rendered initially. In provided example, you can see a comparison between child components mapped initially from static data array (works fine) and rendered conditionally, e.g. after some remote data is fetched, which is a common scenario.2. CodeSandbox reproduction of the bug
https://codesandbox.io/s/staggerchildrenissue-tkkie?file=/src/App.js
3. Steps to reproduce
Refresh provided codesandbox example.
4. Expected behavior
Children components rendered conditionally should be staggered the same as the ones rendering initially.
5. Environment details
KDE neon 5.19, Chrome 85.0.4183.102 (Official Build) (64-bit)