Package-level declarations

Properties

Link copied to clipboard
val DoneCallbackCompositionLocal: ProvidableCompositionLocal<() -> Unit?>
Link copied to clipboard

Provides the global router instance for use outside of composition.

Link copied to clipboard

Internal global router instance for use outside of composition. Do not use directly. Use Router.global instead.

Functions

Link copied to clipboard
@Composable
fun RouteBuilder.intAction(block: suspend RouteBuilder.(Int) -> Unit)

Executes the given block inside RouteEffect when the route matches the int.

Link copied to clipboard
@Composable
fun RouteBuilder.noMatchAction(block: suspend RouteBuilder.NoMatch.() -> Unit)

Executes the given block inside RouteEffect when the route doesn't match.

Link copied to clipboard
@Composable
fun RouteBuilder.routeAction(vararg route: String, block: suspend RouteBuilder.() -> Unit)

Executes the given block inside RouteEffect when the route matches the given path.

Link copied to clipboard
@Composable
fun RouteEffect(vararg keys: String?, block: suspend () -> Unit)

LaunchedEffect wrapper which automatically add route path as a key. It also supports executing done callback, which is used within SSR routers.

Link copied to clipboard
@Composable
fun SimpleBrowserRouter(initRoute: String, contextPath: String = "", routing: @Composable RouteBuilder.() -> Unit)
Link copied to clipboard
@Composable
fun SimpleHashRouter(initRoute: String, routing: @Composable RouteBuilder.() -> Unit)
Link copied to clipboard
@Composable
fun RouteBuilder.stringAction(block: suspend RouteBuilder.(String) -> Unit)

Executes the given block inside RouteEffect when the route matches the string.