Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Handles a simple form submission.
# sycamore/demo/form.rs
use sycamore::prelude::*;
fn app<G: Html>() -> View<G> {
let name = create_signal(String::new());
let message = create_signal(String::new());
view! {
div {
input(bind:value=name)
button(on:click=move |_| message.set(format!("Hello, {}!", name.get()))) {"Submit"}
p { (message.get()) }
}
}
}
fn main() {
sycamore::render(app);
}Sycamore is a reactive, component-based web framework for Rust that allows developers to build fast, type-safe web applications with a declarative approach similar to React or Solid.js.
Origin & Creator
Sycamore was created by Austin Donnelly and contributors, inspired by modern reactive JavaScript frameworks but designed for Rust and WebAssembly.
Industrial Note
Sycamore is ideal for Rust developers who want high-performance, type-safe web apps without leaving the Rust ecosystem, and for projects where predictable memory management and performance are critical.