Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

useEffect in useGlobal has no dependencies and will run every render #180

@dlee

Description

@dlee

The function to add the global listener in useEffect will be rerun in every render since no dependency array is provided:
https://github.com/CharlesStover/reactn/blob/master/src/use-global.ts#L69-L83

Is this intentional?

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