849 Views
A prop can take any form, from a simple string or number to a complex object. And even a Function. This is exactly the idea behind Callback Props: a Function that gets passed as prop to a child component, so the child component can execute it whenever it wants (after a button is clicked, a form is submitted, an API request failed...).
0 comments