navigation-3

Migrate Android Compose apps to Jetpack Navigation 3 with type-safe routing.

28|5|Updated Oct 8, 2024
One-click install
npx skills add https://github.com/kabirnayeem99/Ktor2Curl --skill navigation-3-kabirnayeem99
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: navigation-3
Source: https://github.com/kabirnayeem99/Ktor2Curl/tree/main/.agents/skills/navigation-3
Command: npx skills add https://github.com/kabirnayeem99/Ktor2Curl --skill navigation-3-kabirnayeem99

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the transition from legacy navigation systems to the modern Jetpack Navigation 3 architecture, ensuring your app's navigation is type-safe, adaptive, and easy to maintain.

Core Features & Use Cases

  • Type-Safe Navigation: Eliminates runtime crashes by replacing string-based routes with serializable Kotlin objects.
  • Adaptive Layouts: Provides built-in support for complex UI patterns like list-detail, supporting panes, and bottom sheets.
  • Use Case: If you are migrating a large-scale application from Navigation 2, this Skill provides the exact recipes and migration steps to implement multiple backstacks and conditional navigation flows without breaking existing state.

Quick Start

Use the navigation-3 skill to generate a migration plan for my current project by analyzing my existing NavHost configuration.

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 Android Compose?

Type-safe navigation in Jetpack Navigation 3 replaces string-based routes with serializable Kotlin objects. This eliminates runtime crashes by enforcing compile-time type safety through Kotlin serialization and the NavKey interface.

Does Navigation 3 support adaptive layouts like list-detail and bottom sheets in Android?

Yes, Navigation 3 provides built-in support for complex adaptive UI patterns in Android Compose. It handles list-detail views, supporting panes, and bottom sheets natively within the modern navigation architecture.

What are the prerequisites for implementing Jetpack Navigation 3 in my Android app?

Implementing Jetpack Navigation 3 requires Kotlin serialization and adherence to the NavKey interface for state persistence. You need these dependencies configured to enable type-safe destination routing in your Compose application.

How do I handle multiple backstacks when migrating to Jetpack Navigation 3?

Handling multiple backstacks in Jetpack Navigation 3 requires defining serializable NavKey objects for your destinations. This preserves existing state during migration while supporting conditional navigation flows without breaking complex backstack hierarchies.

Why should I use type-safe routing instead of string-based routes in Android Compose?

Type-safe routing in Android Compose eliminates runtime crashes by replacing string-based routes with serializable Kotlin objects. This approach ensures compile-time validation of navigation paths and makes your app's navigation easier to maintain.