A woman holding the hand of her child outdoors, in a dry environment on a dusty trail, with a pond in the background. The woman and child have their backs facing us.

How to pass a function to a child component in React.

In React, passing a function to a child component can easily be done by passing the function as a prop to the child. This works even when the function uses state from the parent. If we bind the function with the keyword ‘this’ in it’s parent constructor, then we can freely use the function in …

How to pass a function to a child component in React. Read More »