Quantcast
Channel: Projectmw Blog
Viewing all articles
Browse latest Browse all 75

Passing a function prop from child to parent

$
0
0
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:

Viewing all articles
Browse latest Browse all 75

Trending Articles