entry

fun entry(screen: Screen)(source)

Set the start destination to a static screen.

Replaces the deprecated startScreen method.

Parameters

screen

The screen to navigate to when entering this graph directly


fun entry(route: suspend (StoreAccessor) -> NavigationNode, loadingThreshold: Duration = 200.milliseconds)(source)

Define dynamic entry with a typed NavigationNode route selector.

route is evaluated when navigating directly to this graph to determine the destination. Return any NavigationNode — a Screen, Navigatable, or Graph object.

If evaluation exceeds loadingThreshold, the global loading modal configured via loadingModal() at the module level is shown as a RenderLayer.SYSTEM overlay.

To guard all routes inside this graph (including deep links and direct screen navigation), wrap the graph with intercept at the parent level instead.

Example:

graph("content") {
entry(
route = { store ->
val state = store.selectState<ContentState>().value
if (state.releases.isNotEmpty()) ReleasesScreen else NoContentScreen
}
)
screens(ReleasesScreen, NoContentScreen)
}

Parameters

route

Typed selector returning the NavigationNode to navigate to

loadingThreshold

How long to wait before showing the global loading modal (default 200ms)