Additional resources and links
Here is a small list of resources I found useful to understand hooks or use them every day to conclude this guide.
Hooks
- Introducing Hooks: if you have never heard of hooks, probably the best place to start. The complete official documentation about hooks is very well written and the best reference.
- React Today and Tomorrow and 90% Cleaner React With Hooks: the conference by Sophie Alpert and Dan Abramov introducing hooks.
- How to fetch data with React Hooks?: an in-depth guide by Robin Wieruch on calling an API in a component. His blog contains a lot of exciting articles about React and hooks.
- Myths about useEffect:
excellent practices, tips, and tricks for using
useEffect, by Kent C. Dodds. - React Hooks Testing Library: an excellent library to write unit tests for your hooks, independently of any component.
Find new hooks
- useHooks, Easy to understand React Hook recipes: many custom hooks, commented so you could know how they work. Very nice if you prefer developing custom hooks for a precise need instead of just looking for a third-party library.
- Hooks with React Redux: if you use Redux, you’ll be happy to know that you can now use it with some handy hooks it provides.
- React Native Hooks: hooks can make your code cleaner in React Native too. Here you’ll find hooks for everyday operations, such as accessing the clipboard or getting the device orientation.
Advanced resources
- A Complete Guide to
useEffect: written by Dan Abramov, a profound article. Don’t expect to read it during a small break, but if you master everything said in this article, you can consider yourself an expert withuseEffect. All the posts on this blog are worth reading. - Why React Hooks over HOCs: if you used high-order components a lot, here is an article comparing them with hooks and explaining how hooks often represent a better way to do things.
- A Thoughtful Way To Use React’s
useRef()Hook: some situations where using a ref withuseRefcan be useful.