React Custom Hooks Flashcards

1
Q

What is a React custom hook

A

A custom hook, whatever you need it to be

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

When you’re reusing a hook over and over, when you don’t use a hook

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

what is the syntax for writing a custom hook?

A

use(Name of 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

useHook

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

when do custom hooks execute

A

When you call for them

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