react-events-and-states Flashcards

1
Q

What is the purpose of state in React?

A

To keep track of values that will change over time and to determine what to display

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to you pass an event handler to a React element?

A

Pass the event handler to the react element’s property; give it the event attribute and set that equal to a javascript expression and pass that a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly