31 lines
571 B
Rust
31 lines
571 B
Rust
use wasm_bindgen::prelude::*;
|
|
use yew::prelude::*;
|
|
|
|
struct Home {}
|
|
|
|
impl Component for Home {
|
|
type Message = ();
|
|
type Properties = ();
|
|
|
|
fn create(_: Self::Properties, _: ComponentLink<Self>) -> Self {
|
|
Self {}
|
|
}
|
|
|
|
fn update(&mut self, _: Self::Message) -> ShouldRender {
|
|
true
|
|
}
|
|
|
|
fn change(&mut self, _: Self::Properties) -> ShouldRender {
|
|
true
|
|
}
|
|
|
|
fn view(&self) -> Html {
|
|
html! { <span>{"Hello World!"}</span> }
|
|
}
|
|
}
|
|
|
|
#[wasm_bindgen(start)]
|
|
pub fn run_app() {
|
|
App::<Home>::new().mount_to_body();
|
|
}
|