Vue NativeVue Native
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
  • Navigation
  • Stack Navigation
  • Passing Params
  • Navigation Guards
  • Screen Lifecycle
  • Tab Navigation
  • Drawer Navigation
  • Nested Navigators
  • State Persistence

Passing Params

Passing params on navigation

router.push('profile', { userId: 123, username: 'alice' })

Reading params in the destination screen

useRoute() returns a ComputedRef<RouteLocation> -- access .value for the current route:

<script setup>
import { useRoute } from '@thelacanians/vue-native-navigation'

const route = useRoute()
// route.value.name    -> 'profile'
// route.value.params  -> { userId: 123, username: 'alice' }
</script>

<template>
  <VView :style="{ padding: 20 }">
    <VText>User: {{ route.value.params.username }}</VText>
    <VText>ID: {{ route.value.params.userId }}</VText>
  </VView>
</template>

useRoute() is reactive -- if params change (e.g. via router.replace), the component re-renders.

Passing complex objects

Params can be any serializable value:

router.push('checkout', {
  items: [{ id: 1, qty: 2 }, { id: 3, qty: 1 }],
  total: 49.99,
})

RouteLocation type

interface RouteLocation {
  name: string
  params: Record<string, any>
  options: RouteOptions
}
Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Prev
Stack Navigation
Next
Navigation Guards