Learningfuze Bootcamp > react-events-and-state > Flashcards
What is the purpose of state in React?
Keep track of values that change over time.
It’s a serializable* representation of one point in time—a snapshot.
The state starts with a default value when a Component mounts and then suffers from mutations in time (mostly generated from user events)
How to you pass an event handler to a React element?
As a prop. In event name and camel case (starts with ‘on’)