react-events-and-state Flashcards
1
Q
What is the purpose of state in React?
A
An object that represents the parts of the app that can change. Make the application more dynamic.
2
Q
How to you pass an event handler to a React element?
A
Using the onClick attributes.