Skip to content

How to access 'manual visit' functions using Vue 3's <script setup> syntax #1011

Answered by ajnsn
stevie-c91 asked this question in Help (Vue)
Discussion options

You must be logged in to vote

Hey @stevie-c91

you need to import Inertia, see example below!

<script setup>
import { Inertia } from '@inertiajs/inertia';

function visitHelloWorld() {
  Inertia.visit('/hello-world');
}
</script>

Hope this helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stevie-c91
Comment options

Answer selected by stevie-c91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants