Foundations for Reacts
Foundations are the first React ideas: components as functions that return JSX, props that pass data down, and state that makes a component remember values between renders. Event handlers update state through setters, which triggers React to re-render and show the new result.
Stage: Components · Part of the React roadmap · Last reviewed 19 November 2026
What to learn in Foundations
- Write a function component that returns JSX
- Pass data into a component with props and destructure them
- Store a value with useState and update it in a click handler
- Explain why state is updated with a setter instead of direct mutation
- Compose small components into a larger layout
- Describe what re-rendering means and what triggers it
Foundations interview questions
What is the difference between props and state?
Props are inputs passed from a parent and are read-only inside the receiving component. State is data owned by a component that can change over time, and updating it causes a re-render. Props flow down while state lives where it is declared.
Why can you not modify state directly in React?
React detects changes through the setter function and compares new references. Mutating an object or array in place does not trigger a re-render and can leave stale values. Always create a new object or array when updating state.
Where Foundations fits in the React roadmap
Foundations belongs to the Components stage (beginner level), which takes about 25 hours. Think in components.
Other units in this stage
Back to the full React roadmap