Runable v1.0.0-alpha.20
Why Runable? Docs Modules Work with AI Blog About Changelog
  • 01Why Runable?
  • 02Docs
  • 03Modules
  • 04Work with AI
  • 05Blog
  • 06About
  • 07Changelog
Vue without a fixed server runtime.
Getting Started Structure Integrations Guide MCP API
  • Getting Started Structure Integrations Guide MCP API
Components
  • RunablePage
  • RunableLink
  • RunableLayout
  • ClientOnly
Composables
  • useAsyncData
  • useFetch
  • useConfig
  • useRuntime
  • useApp
  • useAppError
  • useRouter
  • useRoute
  • navigateTo
  • onBeforeRouteUpdate
  • injectHead
  • useHead
  • useSeoMeta
  • useHeadSafe
  • useSchemaOrg
Globals
  • $fetch
  • definePageMeta
  • defineVueMiddleware
  • defineVuePlugin
  • Vue APIs

navigateTo

Navigate to another route from a component, composable, or plugin.

function navigateTo(
  to: RouteLocationRaw | undefined | null,
  options?: { replace?: boolean },
): Promise<void | NavigationFailure> | undefined

By default, navigateTo() adds an entry to the browser history with router.push():

await navigateTo("/projects");
await navigateTo({
  name: "project-details",
  params: { id: "42" },
});

Set replace to avoid keeping the current URL in the history:

await navigateTo("/login", { replace: true });

Passing null or undefined does nothing and returns undefined. Navigation failures and errors are returned or rejected by Vue Router, so callers can handle them normally.

Report an issue Edit this page
useRoute

Read the currently resolved Vue Router route.

onBeforeRouteUpdate

Register a guard that is removed automatically when its Vue scope ends.

Runable

The Vue framework that brings productive conventions to any backend.

Product

  • Why Runable
  • Documentation
  • Installation
  • Integrations

Project

  • About
  • Blog
  • Changelog
  • Sponsor

Community

  • GitHub
  • Issues
  • Discussions
  • Bluesky

© 2026 Runable. Released under the MIT License.

Open source Built with Vue and Runable