Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
Props are inputs passed in by the parent and read-only for the component; state is data the component owns and changes over time, which triggers a re-render.
Props flow down from parent to child, like function arguments, and the child should never modify them. State is created inside a component with useState or useReducer, and only that component can update it through its setter. When state changes, React re-renders the component and its children with the new values. If a child needs to change data that comes from props, the parent passes a callback, and the parent updates its own state.