Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
docs: 📝 Use await instead of return
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDutchCoder committed Sep 21, 2022
1 parent daf99c3 commit 1d56727
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/content/3.api/3.utils/navigate-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ An object accepting the following properties:

```vue
<script setup>
// passing 'to' as a string
return navigateTo('/search')
// ... or as a route object
return navigateTo({ path: '/search' })
// ... or as a route object with query parameters
return navigateTo({
path: '/search',
query: {
page: 1,
sort: 'asc'
}
})
// passing 'to' as a string
await navigateTo('/search')
// ... or as a route object
await navigateTo({ path: '/search' })
// ... or as a route object with query parameters
await navigateTo({
path: '/search',
query: {
page: 1,
sort: 'asc'
}
})
</script>
```

Expand Down

0 comments on commit 1d56727

Please sign in to comment.