navigation-3

Migrate Jetpack Navigation 2 Compose apps to Navigation 3 with type-safe routes.

174|8|Updated Jan 9, 2024
One-click install
npx skills add https://github.com/klxiaoniu/QQVersionList --skill navigation-3-klxiaoniu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: navigation-3
Source: https://github.com/klxiaoniu/QQVersionList/tree/main/.agents/skills/navigation-3
Command: npx skills add https://github.com/klxiaoniu/QQVersionList --skill navigation-3-klxiaoniu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you migrate an Android Jetpack Navigation 2 Compose app to Jetpack Navigation 3 without breaking navigation behavior or state handling.

Core Features & Use Cases

  • Navigation 2 to Navigation 3 migration planning with a dependency update checklist and route model changes (including NavKey adoption).
  • Implementing Navigation 3 architecture patterns such as type-safe navigation keys, NavDisplay back stack rendering, and an entryProvider-based destination registry.
  • Building advanced navigation behaviors using recipes, including deep links, multiple back stacks, Scenes (dialogs/bottom sheets/list-detail/two-pane/supporting pane), conditional navigation, results returning, and Hilt integration patterns for modular apps.

Quick Start

Ask the navigation-3 skill to outline a step-by-step migration plan from your current Navigation 2 Compose setup to Navigation 3, including what code changes you must make for routes, NavHost/NavController replacement, and preserving back stack state.

Frequently Asked Questions about navigation-3

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Jetpack Navigation 2 to Navigation 3 in Compose?

To migrate from Jetpack Navigation 2 to Navigation 3, update your navigation dependencies, implement NavKey for generic typed routes, replace NavController and NavHost with a Navigator-style state plus NavDisplay, and configure required scene strategies and entryProvider mappings.

What is type-safe navigation in Jetpack Compose using NavKey?

Type-safe navigation using NavKey involves modeling your routes as generic typed keys, allowing the Navigator-style state and NavDisplay to render back stacks while ensuring compile-time safety for navigation destinations.

How do I handle adaptive layouts and multiple back stacks in Navigation 3?

Navigation 3 handles adaptive layouts and multiple back stacks by utilizing Scenes for dialogs, bottom sheets, and list-detail or two-pane views, alongside specific scene strategies configured within your NavDisplay setup.

Can I preserve deep link handling and conditional flows when migrating to Navigation 3?

Yes, migrating to Navigation 3 preserves deep link handling, conditional navigation flows, and returning results between screens by implementing structured recipes and mapping destinations through the entryProvider registry.

Does Navigation 3 work with Hilt integration for modular Android apps?

Navigation 3 supports Hilt integration patterns for modular Android apps by structuring destination provisioning and dependency injection around the entryProvider mappings and type-safe NavKey routes.

What are the limitations of replacing NavController with a Navigator-style state in Compose?

Replacing NavController with a Navigator-style state requires completely updating your route models to NavKey and restructuring destination registries via entryProvider, meaning existing Navigation 2 Compose behaviors must be manually adapted to the new scene strategies.