Beginner React Interview QuestionsBeginnerConcept
React · Question 24
What does one-way data flow mean in React?
Direct answer
One-way data flow means data is normally passed down the component tree through props, while children request changes by invoking callbacks or updating shared state through an owning abstraction.
- Parent owns data: the parent decides the current value.
- Data flows down: children receive current values through props or context.
- Events communicate intent: children can call handlers supplied by the owner to request an update.
This model makes it easier to identify the single source of truth for each piece of application state.