Recipes
Deep links and restoration
Encode typed parameters, accept legacy aliases, reconstruct parent entries, and keep process-local routes out of durable history.
Deep links and restoration
Keep parameters typed
Read query values only inside NavigationUriCodec. Parse, validate, and construct the Destination there; feature call sites continue using its constructor.
Migrate an old URL
Add a decode-only NavigationUriAlias. The canonical codec remains the only encoder, so route reports converge on one URL.
Rebuild the parent flow
Return a typed list from stackPlanBuilder. Opening an order detail link can atomically install Home, Orders, and Order Detail without rendering an invalid leaf-only stack.
Restrict absolute links
Configure allowed schemes, hosts, subdomain policy, and path prefixes. Treat this as an application trust boundary in addition to native platform configuration.
Mark process-local values honestly
Use sessionOnly when a Destination contains a callback or object handle. Prefer stable IDs and restorable routes for normal application screens.