React JS Quiz
HomeBlogPrivacy PolicyContact UsTutorialsNewBuy me a coffee

Custom Hooks

  1. 1.What Makes a Custom Hook
  2. 2.Extracting a Hook
  3. 3.Hooks Worth Writing
  4. 4.Lesser-Known Built-in Hooks
  5. 🏁 End-of-tutorial quiz
Advertisement
Tutorials/Intermediate/Custom Hooks

Custom Hooks

Extract stateful logic into functions you can reuse, learn the rules that make a function a hook, and build the handful of hooks every project ends up needing.

Level
Intermediate
Chapters
4
Exercises
1
Reading time
15 min
Start the tutorial →

What you will cover

  1. 1. What Makes a Custom HookThe naming rule, what gets shared and what does not.
  2. 2. Extracting a HookRefactoring a component into a hook, and choosing what to return.
  3. 3. Hooks Worth WritingFour small hooks that show up in almost every project.
  4. 4. Lesser-Known Built-in HooksThree hooks that solve specific problems custom hooks often need.
Already know this? Jump to the 7 question quiz →

Up next after this one: Component Patterns

Advertisement
Advertisement
Support the developer