react-pirate
react-pirate copied to clipboard
Do `useInterval` and `useTimeout` re-initialize on every re-render?
I'm not sure if something changed in the API for useEffect, but I think that, if you omit the second argument, it will re-run the effect on every re-render.
Well, given a recent article from Dan Abramov I think the current hooks need to be updated in order to be performant.
@dispix when you say "the current hooks" do you mean the hooks in this repo or the React hooks API?
It would be great to have some kind of notice or warning on the repo. Otherwise it seems like the repo is actively maintained, as the last change was about 2 months ago.
The version 1.3.0 provides the updated hooks. Keep in mind that 2 months without an update for something as new as hooks is a very, very long time. I wasn't planning on actively maintaining this repository unless it is used, in which case I will definitely put the time and effort required. It just seemed to me that it didn't got enough attention.
You're right, two months is a long time. I've found your repo through one of the "awesome-react-hooks" repos and at first thought it's maintained, since it's there. Then I figured that useInterval doesn't work as expected. :/
Don't maintain the repo because of me. I've copy-pasted most of the hooks to my own repo.
Nooooo, this repo's awesome! Can't force you to maintain it but I'd be happy to help if it makes a difference. I think it'll get more attention as people start to adopt hooks more.
@skipjack Well honestly I'm really glad you think so 😃 I mean if at least one person likes it then I'd be glad to maintain it ! But your help would be welcome of course.
I mean if at least one person likes it then I'd be glad to maintain it!
Lol I appreciate that but I'm fully aware how time consuming open source can be, so don't maintain just for my sake. I guess my point is just give it some time, I think this package will get more traction.
I came across it through awesome-react-hooks as well but I did probe a lot of other packages for lifecycle recipes and this one seemed best. I can't imagine that other people who are going more stateless/functional wouldn't be out looking for something like this. Plus... I mean come on... the package name is perfect 😜
I'll stop spamming @vfonic's issue though, just saw the conversation above and figured I'd chime in with an upvote.