Problem Statement
How can a child component communicate changes back to its parent in React Native?
Explanation
A parent can pass down a callback function as a prop. The child calls this function with the required data. This pattern allows controlled components and two-way communication while maintaining React’s one-way data flow.
Code Solution
SolutionRead Only
Parent → <Child onValueChange={(val) => setValue(val)} />
Child → props.onValueChange(newValue);Practice Sets
This question appears in the following practice sets: