Custom Hooks Flashcards
1
Q
What is a React custom hook?
A
components of code you create yourself that can be used over an over again
2
Q
When are custom hooks useful? When are they not required?
A
not reauired when you only need to use the function once if you need to use it more than it is useful
3
Q
What is the syntax (or naming convention) for writing a custom hook?
A
use Infront of the hook
4
Q
How do you call a custom hook?
A
like a function
5
Q
When do custom hooks execute?
A
only when you call them