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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the syntax (or naming convention) for writing a custom hook?

A

use Infront of the hook

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you call a custom hook?

A

like a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When do custom hooks execute?

A

only when you call them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly