inertia
inertia copied to clipboard
Actions can only be applied to DOM elements, not components
I am using Inertia and Sveltestrap.
I am trying to add use:inertia to a NavLink component but I get the following error:
Actions can only be applied to DOM elements, not components
Here is the code:
<script>
import {inertia} from '@inertiajs/inertia-svelte'
import {NavLink} from 'sveltestrap'
</script>
<NavLink href="/login" use:inertia>Login</NavLink>
Is there any way I can use:inertia on a non-DOM element (e.g. a component)?