Hooked on React hooks

Markus Claus on March 17, 2019

Whenever I read about a new feature in React, I'm all over it. I try to understand what's going on and how I could apply this new feature to my p... [Read Full]
markdown guide

Great article!

Your explainations are clear and accessible.

I probably found a typo in your custom hook useFetchData inside the useEffect deps. You wrote [props.id] but maybe you meant to write [url] or something like this.

Cheers! 🦄


You are correct. That was a copy and paste error. I missed that.

Thank you 😊


Thanks for this article 💪 I understand now how to use react hooks 🙃


Your useFetchData example is wrong. Look at the function signature and how you call it.


True, late night posting.. Never a good idea. Fixed it, thanks.


Can we actually make multiple fetches with Promise.all inside an useEffect hook?


I'm not sure the exact question here. But Hooks have a clear set of rules to follow. As well 'useEffect' can be used several times so you that you cad can properly group related code and seperate it from unrelated code. Co-location of your effects

code of conduct - report abuse