Skip to content
Commitwise
Menu

Back stack

The stack of screens the user has visited; opening a screen pushes it, Back pops it.

Definition

Navigation libraries keep one entry per visited destination, each with its own lifecycle, ViewModels and saved state. Options like popUpTo, launchSingleTop and saveState shape the stack so Back does what users expect: login and onboarding disappear after use, and bottom navigation tabs keep their own history.

In practice

After login, navigate(Home) { popUpTo<Login> { inclusive = true } } leaves only Home, so Back closes the app.

Related terms

Esc

Type to search the whole site.