React · Middle · Question 56 of 75

What makes a good custom hook?

Explanation

Custom hooks share logic, not state. Names describing lifecycle (useMount) hide intent; prefer names describing what the hook does for the component.

Further reading

Problem with a question

React · Middle · question 56

Test yourself

Take the React · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz