0👍
In your Inertia
component, you have something that looks like this.
<template>
<div>
<Index
:videos="videos"
:request="request"
></Index>
</div>
</template>
<script>
export default{
name: 'Inertia',
props: {
},
components: {
Index,
},
}
</script>
Add a v-if
condition to it like this so that it doesn’t render until the data exists to be passed to the child component.
<template>
<div>
<Index
v-if="videos && videos.data"
:videos="videos"
:request="request"
></Index>
</div>
</template>
<script>
export default{
name: 'Inertia',
props: {
},
components: {
Index,
},
}
</script>
Source:stackexchange.com