I am looking to access a child component's method from the parent in Vue.js. To achieve this, I plan on using $refs
.
Code Example:
<template>
<div>Parent!</div>
</template>
Script:
<script>
Vue.component('child',{
template: `<div>I am child</div>`,
}
export default {
name: 'Parent'
}
</script>
How can I declare $refs
for my child component within this setup?