Skip to content

Unmount hooks should be called during the commit phase to ensure consistency with React #4299

Open
@farwayer

Description

@farwayer

Describe the bug

I've run into issues several times that are caused by calling cleanup functions during the rendering phase. First time in the UI library (a similar case is described here #4222). The second time with a library that prohibits data modification at the rendering stage.

It would be nice for React compatibility and to prevent problems like this to call cleanup functions on hooks after rather than during rendering.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions