Section 27: State Flashcards
1
Q
State
A
Data in our application that can change.
2
Q
setState
A
*The correct way to change state in your application.
Simplest Usage: setState accepts an object with new prperties and values for this.state
this.setState({ });
**this.setState is asynchronous.
3
Q
Pure Function
A
A function that is repeatable, so exact same inputs and outputs.
All state changes should be pure functions in React.
4
Q
How is State passed?
A
From parent down to child component as a prop.