NavigationModule

The MVLI module that owns the navigation system.

NavigationModule wires together the static graph definition, the mutable NavigationState, the pure reducer, and the side-effecting NavigationLogic. It is the single source of truth for all navigation-related state in a Reaktiv store.

Create an instance using the createNavigationModule top-level function or the companion create helper:

val navModule = createNavigationModule {
graph("root") {
entry(HomeScreen)
screen(HomeScreen)
screen(ProfileScreen)
graph("auth") {
entry(LoginScreen)
screen(LoginScreen)
}
}
notFoundScreen(NotFoundScreen)
}

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val createLogic: (storeAccessor: StoreAccessor) -> NavigationLogic
Link copied to clipboard
open val createMiddleware: () -> Middleware?
Link copied to clipboard
open override val initialState: NavigationState
Link copied to clipboard

Functions

Link copied to clipboard

Get all registered full paths mapped to their navigatables.

Link copied to clipboard
fun getFullPath(navigatable: Navigatable): String?

Get the full path for a Navigatable.

Link copied to clipboard

Get the graph ID for a NavigationEntry by resolving its Navigatable.

Link copied to clipboard

Returns the LoadingModal configured for this module, or null if none was provided.

Link copied to clipboard

Resolve the Navigatable for a NavigationEntry using the registered path.

Link copied to clipboard
open suspend fun selectLogic(store: StoreAccessor): ModuleLogic
Link copied to clipboard
Link copied to clipboard