canonrs-server 0.1.0

CanonRS server-side rendering support
1
2
3
4
5
6
7
8
9
10
11
use leptos::prelude::*;
use crate::providers::layout_types::{LayoutContext, LayoutMode};

#[component]
pub fn LayoutProvider(children: Children) -> impl IntoView {
    let mode = RwSignal::new(LayoutMode::default());

    provide_context(LayoutContext { mode });

    view! { {children()} }
}