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
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.
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
4
Q
What are some custom events a component may expose?
A