EN605.607.81.SP22_ASDM_Project/front_end/src/main.rs
Stephen Seo 45e2c88745 Reverse info_text vertically
info_text's latest messages now appear at the top instead of at the
bottom.
2022-03-02 15:38:24 +09:00

26 lines
527 B
Rust

mod constants;
mod state;
mod yew_components;
use state::SharedState;
use yew::prelude::*;
use yew_components::Wrapper;
#[function_component(App)]
pub fn app() -> Html {
let ctx = use_state(SharedState::default);
html! {
<ContextProvider<SharedState> context={(*ctx).clone()}>
<Wrapper />
</ContextProvider<SharedState>>
}
}
fn main() {
// setup logging to browser console
wasm_logger::init(wasm_logger::Config::default());
// start webapp
yew::start_app::<App>();
}