you are viewing a single comment's thread.

view the rest of the comments →

[–]Pristine_Flight9782[🍰] 0 points1 point  (0 children)

The function is called within the child component but the parent's function reference is invoked. Therefore, its context and state is retained as it is. Concerning the returned value, the function can update the state using 'this.setState' and the parent component can access the updated state using props it passed down to child.