start

fun start(screen: Screen)(source)

Set the start destination to a static screen.

Parameters

screen

The screen to navigate to when entering this graph directly


fun start(graphId: String)(source)

Set the start destination to another graph by its route ID.

When this graph is entered directly, navigation is forwarded to graphId. If graphId itself has a dynamic start lambda, a loadingModal must be configured at the module level.

Parameters

graphId

The route of the graph to delegate entry to


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

Define a dynamic start destination evaluated at navigation time.

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

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") {
start(
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)