Skip to content

useMounted bug? #41

@YurySolovyov

Description

@YurySolovyov

https://reactjs.org/docs/refs-and-the-dom.html says that

ref updates happen before componentDidMount or componentDidUpdate lifecycle methods.

So, should we set it to false initially here:

const mounted = useRef(true)

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions