Closed jeetiss closed 4 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
Is this do the same thing as #1 ?
@alireza-mh yes
I think #1 should be preferred over this solution. There is no need to add a dependency for this.
Thank you for proposing this change, @jeetiss. Appreciate it! I've chosen to opt for https://github.com/GoogleChromeLabs/react-adaptive-hooks/pull/1 which we just landed in favor of introducing the dependency for now. Cheers!
useConstant
is better way to use constants as a hook)it's run ones, don't have invalidation and don't create logic for update value, it's size just 223B
I added
use-constant
as deps. Do you think will be better move it to repo?