Skip to content

one time effect with useEffect #7

Closed
@dwhitney

Description

@dwhitney

useEffect doesn't appear to work as a "one time effect". I'd like to use it to send a message to a web worker when a component loads, but nothing happens until the component unmounts. I'd use useAff, but because it sets state, I'm getting into a nasty infinite loop in my particular case. If you need an example, I can put one together, but perhaps I just need clarification on how to do a "one time efect"

Thanks!

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