[Vuejs]-Control Vue component from nested layout using Inertia JS

0👍

If you are trying to pass information from your child component to your parent component such as a title, you can use $emit.

Here is a article describing how: https://hvekriya.medium.com/pass-data-from-child-to-parent-in-vue-js-b1ff917f70cc
And another SO question: https://stackoverflow.com/a/52479745/4517964

0👍

The fast way I found to pass data to persistent layouts is by:

in the child

use this:

layout: (h, page) => { return h(Layout, () => page) }

instead of:

layout: Layout,

and in the parent layout you can access your child with this.$slots.default()[0]

Leave a comment