1👍
✅
The best approach for this is to pass the entity to be updated directly in props:
<UpdateForm :post="post" v-if="updateFormVisibility"/>
And then do all needed logic in created
hook of UpdateForm.vue.
Note that you will not need refs anymore and your component will not depend on somebody calling the functions.
Source:stackexchange.com