Skip to content

[FR]: migrate navigation-compose to Jetpack Navigation 3 #1632

@sammkkit

Description

@sammkkit

Is there an existing issue for this?

  • I have searched the existing issues

Is this a feature request for one of the samples?

  • Yes, this is a specific request related to this samples repo.

Sample app

JetNews

Describe the problem

Feature Request

I’d like to propose migrating the current navigation-compose based setup to
Jetpack Navigation 3 (Nav3), starting with a small and well-scoped flow.

Motivation

Navigation 3 introduces:

  • State-driven navigation
  • Type-safe destinations (no string routes)
  • Better testability and UI/state separation
  • Alignment with modern Compose & MVI-style architectures

Migrating would:

  • Reduce reliance on NavController
  • Make navigation logic easier to reason about and test
  • Future-proof the codebase as Navigation 3 matures

Additional Notes

I’m happy to:

  • Start with a draft PR
  • Adjust scope based on maintainer feedback
  • Drop the change if Nav3 adoption isn’t desired at this time

Please let me know if this direction aligns with the project roadmap.

Describe the solution

Proposed Solution

Introduce Jetpack Navigation 3 in a small, isolated scope as a
proof-of-concept, without removing or breaking the existing
navigation-compose setup.

The proposal is to:

  • Define type-safe destinations using a sealed interface (or similar)
  • Manage navigation using a state-driven back stack instead of NavController
  • Keep ViewModels navigation-agnostic
  • Integrate Nav3 at the UI layer only
  • Preserve the current navigation implementation for all unaffected screens

Incremental Plan

  1. Select a single navigation flow .
  2. Introduce a Nav3-based navigator for this flow only
  3. Keep the existing NavHost for the rest of the app
  4. Validate behavior parity (back handling, deep links if applicable)
  5. Document the pattern for potential future adoption

This approach keeps the change:

  • Low risk
  • Easy to review
  • Reversible if needed

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriage meIssue that needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions