react-events-and-state Flashcards
1
Q
What is the purpose of state in React?
A
Determine what is going to be displayed on the screen and also for reusability. (object that can change).
2
Q
How do you pass an event handler to a React element?
A
name of the event ={} –> name of the attributes.