// Render executors
/// Executes the user-given function that renders the template on the server-side (build or request time).
Render executors
Executes the user-given function that renders the template on the server-side (build or request time).
Render executors Executes the user - given function that renders the template on the server - side ( build or request time ) .
pub fn render_for_template(
        &self,
        props: Option<String>,
        translator: &Translator,
        is_server: bool,
        router_state: RouterState,
        global_state: GlobalState,
    ) -> View<G> {
        view! {
            // We provide the translator through context, which avoids having to define a separate variable for every translation due to Sycamore's `template!` macro taking ownership with `move` closures
            ContextProvider(ContextProviderProps {
                value: RenderCtx {
                    is_server,
                    translator: translator.clone(),
                    router: router_state,
                    global_state
                },
                children: || (self.template)(props)
            })
        }
    }
pub fn render_for_template ( & self , props : Option < String > , translator : & Translator , is_server : bool , router_state : RouterState , global_state : GlobalState , ) -> View < G > { view ! { // We provide the translator through context, which avoids having to define a separate variable for every translation due to Sycamore's `template!` macro taking ownership with `move` closures ContextProvider ( ContextProviderProps { value RenderCtx { is_server translator translator clone ( ) router router_state global_state } children ( self template ) ( props ) } ) } }
Render executors
Executes the user-given function that renders the template on the server-side (build or request time).
Render executors Executes the user - given function that renders the template on the server - side ( build or request time ) .
&self
props
Option<String>
translator
&Translator
is_server
bool
router_state
RouterState
global_state
GlobalState