Using the same example as passing a function from parent to child but going in the opposite direction. Here the parent has a callback function and passes it to the child component. The child calls the callback with it’s own function as the argument. As before you can use the component like so:
↧