yew-hooks 0.6.4

Hooks for the Yew web framework, inspired by react hook libs like streamich/react-use and alibaba/hooks.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(dead_code)]

pub fn obtain_result() -> String {
    gloo::utils::document()
        .get_element_by_id("result")
        .expect("No result found. Most likely, the application crashed and burned")
        .inner_html()
}

pub fn obtain_result_by_id(id: &str) -> String {
    gloo::utils::document()
        .get_element_by_id(id)
        .expect("No result found. Most likely, the application crashed and burned")
        .inner_html()
}