NavigationState
Immutable snapshot of the navigation system's runtime state.
All derived/computed properties (layer lists, flags, hierarchy) are pre-computed by the reducer so that reads in the Compose tree are allocation-free.
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.
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.
Resolved title string for currentEntry, populated by NavigationRender after invoking the navigatable's titleResource inside the Compose tree.
Number of entries currently in backStack.
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() }.
Alias for visibleLayers — entries that should be rendered.
How long rendered screen content is retained in memory after being popped from the stack.
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.