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 »