use-effect-x icon indicating copy to clipboard operation
use-effect-x copied to clipboard

Maybe could be better use customhook

Open dariovr1 opened this issue 5 years ago • 0 comments

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 avatar Sep 08 '20 15:09 dariovr1