CONTACT US

React TL;DR – a human filter for most useful tech content.

All posts

Best Practices with React Hooks

  1. Follow the rules of Hooks
    • Only call Hooks at the top level
    • Only call Hooks from function components
  2. Use the ESLint plugin for React hooks
  3. Create your function components in the right order
  4. useState can be used exactly like the class component’s state. Not just for a single value
  5. Use custom hooks for sharing application logic
  6. Avoid prop drilling with useContext