Skip to content

[FEATURE] Apply staggerChildren to components entering into an active variant #776

@damianszocik

Description

@damianszocik

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions