Skip to content

Wrong hooks order #9

@edoroshenko

Description

@edoroshenko

Let's say, we have two components (c1, c2) to replace with animation from c1 to c2.
Let's say we replace them in out-in mode.

Then their hooks will be invoked in the following order:
componentDidMount c2
componentWillLeave c1
componentDidLeave c1
componentWillEnter c2

I put here only hooks that I use in my app, but it's enough to get the idea.

It can be easily got round by hiding c2 element's node in componentDidMount hook and showing back in componentWillEnter, but it's desirable to be fixed to make the solution solid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions