-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
The motivation for this was a clearer distinction between the "root" destinations of a back stack and regular routes (represented by NavRoute). This way you don't accidentally use your start destinations in unexpected ways. It also avoids the issue of navigateBackTo with inclusive = true being called with the start destination, which would leave an empty back stack.
However it also comes with downsides:
- Generally higher complexity in the API since there is
BaseRoute,NavRouteandNavRoot. - For the serialization of routes in saved state we're currently just supporting
BaseRouteand not the other 2 as base classes, it can be added but adds additional overhead. - In most cases
showRootis being used the same way thatnavigateBackTowithinclusive = falsecould be used . - A regular screen can never be the root right now. This is an issue if we'd want to properly support deep links in other app's task stack. Building a synthetic back stack like we do right now is only the recommended/expected behavior for deep links in our own back stack. However if another app launches a deep link in their own task, it's expected that only the top level screen is on the back stack. That behavior is a lot less annoying, but currently can't be supported in Khonshu.
Reactions are currently unavailable