Function leptos_axum::render_route

source ·
pub fn render_route<IV>(
    options: LeptosOptions,
    paths: Vec<RouteListing>,
    app_fn: impl Fn() -> IV + Clone + Send + 'static
) -> impl Fn(Request<Body>) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'static>> + Clone + Send + 'static
where IV: IntoView,
Expand description

Returns an Axum Handler that listens for a GET request and tries to route it using leptos_router, serving an HTML stream of your application. The difference between calling this and render_app_to_stream_with_context() is that this one respects the SsrMode on each Route and thus requires Vec<RouteListing> for route checking. This is useful if you are using .leptos_routes_with_handler()