Back to articles
Jetpack Navigation 3 Migration: Type-Safe Routes & Nav2
How-ToSecurity

Jetpack Navigation 3 Migration: Type-Safe Routes & Nav2

via Dev.toSuriDevs

I have a production app with four bottom tabs, nine navigation graphs, and 40+ screens. Deep links from push notifications. OAuth callbacks from third-party services. Shared ViewModels across multi-screen flows. Navigation 2 handled all of this. Messily, with string routes and withArgs hacks, but it worked. Then I tried migrating to Navigation 3. The first screen took 20 minutes. The bottom navigation took three days. Deep links? I almost gave up. Nav3 is genuinely better -- type-safe routes, a visible back stack you actually control, no more NavController black box. But the migration path has gaps that the docs don't warn you about. Shared ViewModels work differently. Deep links are now your problem. Returning results between screens has no built-in solution. This is everything I learned migrating a production app. The good parts, the painful parts, and the workarounds I wish someone had written down before I started. What Nav3 Actually Changes If you've been using Navigation 2, here'

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles