Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
leoha committed Dec 18, 2024
1 parent d81d878 commit ae54430
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ edition = "2021"

[dependencies]
stylist = { version = "0.13.0", features = ["yew", "parser"] }
yew = { git = "https://github.com/yewstack/yew/", features = ["csr"] }
yew = { git = "https://github.com/yewstack/yew/", features = ["csr", "ssr"] }
tokio = "1.42.0"
17 changes: 16 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// npx tailwindcss -i ./styles/input.css -o ./styles/output.css --watch
// trunk serve

use yew::ServerRenderer;
mod app;
pub mod components;
pub mod models;
Expand All @@ -11,3 +11,18 @@ use app::App;
fn main() {
yew::Renderer::<App>::new().render();
}


// / we use `flavor = "current_thread"` so this snippet can be tested in CI,
// where tests are run in a WASM environment. You likely want to use
// the (default) `multi_thread` favor as:
// #[tokio::main]
// #[tokio::main(flavor = "current_thread")]
// async fn main() {
// let renderer = ServerRenderer::<App>::new();
//
// let rendered = renderer.render().await;
//
// // Prints: <div>Hello, World!</div>
// println!("{}", rendered);
// }

0 comments on commit ae54430

Please sign in to comment.