Skip to content

Maybe could be better use customhook #1

@dariovr1

Description

@dariovr1

hi simbathesailor.

I really appreciate what you did and the idea you got.

However, in my opinion, could be better use just two other customHook that provide a check of firstrun and previus object by dependency.

In term of separation concerns, maybe this my replacement avoid an array of dependency in favor of a single watch property (maybe useful in redux).

This is the gist after you have imported the BetterUseEffect function you can use it instead of plain useEffect.

Tell me if you like my idea.

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