-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hydration has been feature-gated and disabled by default for now due to a bug where interpolated variables are duplicated. This results in a full page flicker for now until this error is fixed. BREAKING CHANGE: upgraded to Sycamore v0.7.0 (see [their changelog](https://github.com/sycamore-rs/sycamore/blob/master/CHANGELOG.md))
- Loading branch information
1 parent
d178f5a
commit 3989241
Showing
45 changed files
with
227 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
use perseus::Template; | ||
use sycamore::prelude::{component, template, GenericNode, SsrNode, Template as SycamoreTemplate}; | ||
use sycamore::prelude::{component, view, Html, SsrNode, View}; | ||
|
||
#[perseus::template(AboutPage)] | ||
#[component(AboutPage<G>)] | ||
pub fn about_page() -> SycamoreTemplate<G> { | ||
template! { | ||
pub fn about_page() -> View<G> { | ||
view! { | ||
p { "About." } | ||
} | ||
} | ||
|
||
#[perseus::head] | ||
pub fn head() -> SycamoreTemplate<SsrNode> { | ||
template! { | ||
pub fn head() -> View<SsrNode> { | ||
view! { | ||
title { "About Page | Perseus Example – Basic" } | ||
} | ||
} | ||
|
||
pub fn get_template<G: GenericNode>() -> Template<G> { | ||
pub fn get_template<G: Html>() -> Template<G> { | ||
Template::new("about").template(about_page).head(head) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
use perseus::{link, t, Template}; | ||
use sycamore::prelude::{component, template, GenericNode, Template as SycamoreTemplate}; | ||
use sycamore::prelude::{component, view, Html, View}; | ||
|
||
#[perseus::template(IndexPage)] | ||
#[component(IndexPage<G>)] | ||
pub fn index_page() -> SycamoreTemplate<G> { | ||
pub fn index_page() -> View<G> { | ||
let username = "User"; | ||
template! { | ||
view! { | ||
p { (t!("hello", { | ||
"user": username | ||
})) } | ||
a(href = link!("/about")) { "About" } | ||
} | ||
} | ||
|
||
pub fn get_template<G: GenericNode>() -> Template<G> { | ||
pub fn get_template<G: Html>() -> Template<G> { | ||
Template::new("index").template(index_page) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.