react-events Flashcards

1
Q

How to you pass an event handler to a React component?

A

you can pass a function into the onClick attribute, pass down props

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

How do you add custom event handlers to a React component?

A

defines methods on the component class that handles the event

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

What is the naming convention for custom event handlers?

A

onXxx, where Xxx is the name of the event.

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

What are some custom events a component may expose?

A

onBlur, onFocus, onSubmit, etc.

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