Skip to content

Commit

Permalink
Refactor examples
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Nov 17, 2023
1 parent 2ae4f8b commit 3aa41b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ features = ["full"]
rustdoc-args = ["--cfg", "docsrs"]

[[example]]
name = "app"
name = "counter"
required-features = ["full"]
File renamed without changes.
10 changes: 10 additions & 0 deletions examples/hello.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use viewbuilder::prelude::*;

fn app(cx: Scope) -> Element {
cx.render(rsx! { text { font_size: 100., "Hello World!" } })
}

#[tokio::main]
async fn main() {
viewbuilder::launch(app)
}

0 comments on commit 3aa41b9

Please sign in to comment.