Package-level declarations

Types

Link copied to clipboard
data object BrowserRouter : Router

A router leveraging the History API (https://developer.mozilla.org/en-US/docs/Web/API/History).

Link copied to clipboard
data object HashRouter : Router

This Router implementation uses /#/path to persistent the current route in window.location.hash.

Link copied to clipboard
@Immutable
class Parameters
Link copied to clipboard
@Immutable
data class Path(val path: String, val parameters: Parameters?)
Link copied to clipboard
@Stable
class RouteBuilder

Use the DSL functions to build the expected route handled by a Router. If two routes match the same path, the first declared route is chosen.

Link copied to clipboard
@Stable
interface Router
Link copied to clipboard
annotation class Routing

Functions

Link copied to clipboard
@Composable
operator fun Router.invoke(initRoute: String, routing: @Composable RouteBuilder.() -> Unit)
Link copied to clipboard
fun Router.navigate(to: String, parameters: Parameters, hide: Boolean = false, replace: Boolean = false)
fun Router.navigate(to: String, parameters: Map<String, String>, hide: Boolean = false, replace: Boolean = false)
fun Router.navigate(to: String, parameters: Map<String, List<String>>, hide: Boolean = false, replace: Boolean = false)