React-Events Flashcards

1
Q

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

A

Pass event handlers and other functions as props to child components

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

you would set up the custom event handler as a prop of your component then pass the custom event handler to an event like onClick. Then each time you create a new instance of the component, you can specify what event it should watch for.

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

custom event names start with on followed by the name of the event. i.e onClick, onSubmit, onMouseOver

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