Using React-Style Callback Props With Vue: Pros and Cons

added by JavaScript Kicks
7/31/2018 7:10:42 AM


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...).