Component Main Page:
...
<Child>
<template #form="{ init }">
<PageForm :init="init"/>
...
Component Sub Page Form:
...
methods: {
fetchData() {
// calling the method in the Grandchild component of the Main Page
}
}
...
Component Child (render-function):
...
h('GrandChild', {scopedSlots: {form = props => h('div', this.$scopedSlots.form(props)}}
...
Component Grandchild:
template:
...
<div>
<slot name="form" :init="init">
<div>
...
script:
...
mounted: {
// How do I access the getData method from Main Page to Sub Page Form without using Vuex?
}
...