Skip to content

Commit

Permalink
fix: fixed non-hydration rendering
Browse files Browse the repository at this point in the history
It was duplicating the entire page...
  • Loading branch information
arctic-hen7 committed Sep 4, 2022
1 parent 21c608b commit ae934bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/perseus/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ pub fn run_client<M: MutableStore, T: TranslationsManager>(
#[cfg(feature = "hydrate")]
sycamore::hydrate_to(move |cx| perseus_router(cx, router_props), &root);
#[cfg(not(feature = "hydrate"))]
sycamore::render_to(move |cx| perseus_router(cx, router_props), &root);
{
// We have to delete the existing content before we can render the new stuff
// (which should be the same)
root.set_inner_html("");
sycamore::render_to(move |cx| perseus_router(cx, router_props), &root);
}

Ok(())
}
Expand Down

0 comments on commit ae934bf

Please sign in to comment.