Skip to content

Learn vue-router-ns ​

Build native navigation in a NativeScript-Vue 3 app using routes, params, guards and results. The router coordinates real native stacks: pages remain alive underneath each other, each tab can have its own history, and native Back is part of the navigation flow.

Start here ​

Your goalStart withWhat you will have
Add the router to an appInstallationA native Page rendered through RouterView
Learn by buildingYour first appA list, detail page and guarded modal editor, with complete source
Understand the behaviorPages, stacks and stateA model for page lifetime, native Back, tabs and modal ownership
Evaluate the possibilitiesExample galleryReal recordings linked to guides, runnable code and platform limits
Solve an application taskCommon tasksA route to the relevant API and its important constraints

The first-app tutorial assumes basic Vue single-file components and a working NativeScript-Vue project. It introduces one stack before adding results and guards. Fieldnotes is the next step: drawer, native search, shared actions and the same state-retention rules.

Choose a navigation structure ​

Start with one RouterView. Add tabs for independent destination histories, a drawer for a menu around existing content, or list/detail for a compact/expanded layout. A modal temporarily owns a separate stack and can return a value.

The container guide explains supported combinations, including why a drawer, a native tab sidebar and a UIKit split controller are different owners.

Add the native experience ​

Keep titles and buttons in NativeScript's ActionBar. Use page actions to share behavior between headers, menus and supported keyboard commands. Add context menus, transitions, focus and motion behavior as the flow needs them.

For application integration, continue with deep links, system pickers, state restoration and diagnostics. File conventions and experimental integrations have their own advanced guides; explicit routes remain the default.

Coming from Vue Router ​

Familiar method names help, but a mobile app has several possible native stacks and retained pages. Read the differences, then the mental model, before relying on web page-lifetime assumptions.

The package is a release candidate. Compatibility identifies the supported dependencies, experimental APIs and remaining validation limits. The API reference is the lookup index once you know which part of the system you need.

Released under the MIT License.