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

onBeforeRouteUpdate

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

function onBeforeRouteUpdate(guard: NavigationGuard): void
onBeforeRouteUpdate((to, from) => {
  if (to.params.id !== from.params.id) {
    refresh();
  }
});

In the current implementation, Runable registers the guard with router.beforeEach() and removes it with onScopeDispose(). It is therefore a global guard whose lifetime follows the calling scope.

Report an issue Edit this page
navigateTo

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

injectHead

Access the Unhead instance installed in the application directly.

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