State Management · Junior · Question 1 of 75
What is "state" in a React component?
- ✓Correct answer: Data that changes over time and affects what's on screen; a change triggers a re-render
- 2Any variable declared inside the component function
- 3Props passed down to the component by its parent
Explanation
State is the component's memory between renders: a counter value, form input, whether a menu is open. A regular let variable resets on every render and its change doesn't tell React to update the UI. Props are read-only inputs owned by the parent.