Web Development > React Events and State > Flashcards
What is the purpose of state in React?
State is an object that holes information in a component that may change.
How to you pass an event handler to a React element?
By defining a method that calls setState and then passing the method as a prop.