NavigationState
Immutable snapshot of the navigation system's runtime state.
Everything that is a pure function of the back stack is grouped into derived and exposed here under its own name, so navState.visibleLayers reads the same as it always did.
Example - check current location in Compose:
val navState by selectState<NavigationState>().collectAsState()
if (navState.isInGraph("auth")) { ... }
if (navState.isAtPath("home/dashboard")) { ... }Constructors
Properties
Active modal contexts keyed by the modal entry's full path.
Live gesture scrub progress mirrored into state so followers and session captures can replicate interactive gestures. Cleared by any other navigation action.
Ordered back stack; the last element is always equal to currentEntry.
Breadcrumb trail derived from currentFullPath, suitable for navigation UIs.
Entries assigned to RenderLayer.CONTENT.
The entry that is currently active (top of stack).
The full slash-separated path for currentEntry, e.g. "auth/login".
Ordered list of graph IDs from root to the graph containing currentEntry.
Path segments of currentFullPath with empty segments filtered out.
Values computed from backStack and activeModalContexts by the reducer.
Layer entries grouped by their RenderLayer.
Entries assigned to RenderLayer.GLOBAL_OVERLAY.
true when at least one modal is present anywhere in backStack.
true until bootstrap (and any cold-start deep link) has fully resolved. NavigationRender suppresses content layers while this is true to avoid flashing the initial placeholder before the real destination is known.
true when currentEntry resolves to a Modal.
true when currentEntry resolves to a Screen.
true while a guard or entry-definition lambda is being evaluated and the evaluation has exceeded its loading threshold. NavigationRender renders the io.github.syrou.reaktiv.navigation.definition.LoadingModal directly as a boolean-controlled overlay rather than a backstack entry while this is true.
The most recent action dispatched by the navigation system, used for content preservation.
All modal entries currently present in backStack.
Number of segments in currentFullPath.
backStack with each entry's NavigationEntry.stackPosition set to its index.
Navigation that was stored when a guard returned GuardResult.PendAndRedirectTo. Resume it after the guard condition is met via navigation { clearBackStack(); resumePendingNavigation() }.
How long rendered screen content is retained in memory after being popped from the stack.
true when the current destination wants a navigation header.
Entries assigned to RenderLayer.SYSTEM (e.g. loading modals).
The screen rendered underneath the current modal, or null if not in a modal.
Graph hierarchy of underlyingScreen, used so that isInGraph works correctly when isCurrentModal is true.
Entries that should be rendered, ordered from bottom to top layer.