react-events-and-state Flashcards
1
Q
What is the purpose of state in React?
A
to render the proper content depending on user interaction
2
Q
How to you pass an event handler to a React element?
A
You can pass it in like an attribute with a value of the function that will handle the event