Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe could be better use customhook #1

Open
dariovr1 opened this issue Sep 8, 2020 · 0 comments
Open

Maybe could be better use customhook #1

dariovr1 opened this issue Sep 8, 2020 · 0 comments

Comments

@dariovr1
Copy link

dariovr1 commented Sep 8, 2020

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.

@dariovr1 dariovr1 changed the title Maybe could be better use customhok Maybe could be better use customhook Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant