Skip to content

Commit

Permalink
Use LocalServerRenderer instead of ServerRenderer.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Dec 9, 2023
1 parent dea1dba commit 133169e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/wasi_ssr_module/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ mod router;

use anyhow::Result;
use router::{switch, Route};
use yew::prelude::*;
use yew::{function_component, ServerRenderer};
use yew::{prelude::*, LocalServerRenderer};

#[function_component]
fn Content() -> Html {
Expand Down Expand Up @@ -38,8 +37,8 @@ fn App() -> Html {
}

pub async fn render() -> Result<String> {
let renderer = ServerRenderer::<App>::new();
let html_raw = renderer.render_async().await;
let renderer = LocalServerRenderer::<App>::new();
let html_raw = renderer.render().await;

let mut body = String::new();
body.push_str("<body>");
Expand Down

0 comments on commit 133169e

Please sign in to comment.