@Erwin_nl Thank you for your answer :) It is the answer that helped me solve the problem the most.
However, it is important to mention that you have to use the same name (inside your Vue component) that you registered the Link or Head component with in the createInertiaApp .
So if you named them like this:
.component('InertiaHead', Head)
.component('InertiaLink', Link)
your Vue component should look like this:
<template>
<h1>Home</h1>
<nav>
<ul>
<li><InertiaLink href="/">Home</Link></li>
<li><InertiaLink href="/users">Users</Link></li>
<li><InertiaLink href="/settings">Settings</Link></li>
</ul>
</nav>
</template>
I personally prefer to name the Inertia Link component simply Link inside my vue component. Like the following:
<template>
<h1>Home</h1>
<nav>
<ul>
<li><Link href="/">Home</Link></li>
<li><Link href="/users">Users</Link></li>
<li><Link href="/settings">Settings</Link></li>
</ul>
</nav>
</template>
So I must register them inside like so:
.component('Head', Head)
.component('Link', Link)
Note: actually registering the Inertia component with in the createInertiaApp . Is a solution for reducing the boilerplate code of importing and exporting the Inertia component in every vue component like the following:
<script>
import { Link } from '@inertiajs/vue3'
export default {
name: "Home.vue",
components: {
Link,
},
}
</script>
So in order to be able to use the Inertia Link component (and in order for it to display correctly ) you must import it and export it as a component.
PS: i am using
"@inertiajs/vue3": "^1.0.8",
"@vitejs/plugin-vue": "^4.2.3",
"vue": "^3.3.4"