Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

yew crate - example

Runnable project

Example of a web app that says "Hello, World!":

use yew::prelude::*;

#[function_component(App)]
fn app() -> Html {
    html! {
        <h1>{ "Hello, World!" }</h1>
    }
}

fn main() {
    yew::Renderer::<App>::new().render();
}

This code creates a Yew component that returns HTML, then renders the component to the web page.