ssrRouter

@Composable
fun IComponent.ssrRouter(initRoute: String = "/", contextPath: String = getContextPath(), active: Boolean = true, stateSerializer: () -> String? = null, routing: RoutingBuilder.(RoutingContext) -> Unit)(source)

A router supporting Server-Side Rendering (SSR).

When declaring routes using RoutingBuilder.action function, the rendering on the server will be deferred until if an action is executed.

Parameters

initRoute

the initial route to navigate to (default is "/")

contextPath

the context path to prepend to the initial route

active

whether the router is active (default is true)

stateSerializer

an optional serializer for the state, used for SSR

routing

the routing configuration block