pub fn use_state<T, D>(default: D) -> State<T>where T: Send + Sync + 'static, D: FnOnce() -> T,
Analog to react’s useState API. Pass a callback to build the initial state. The returned State-object can be used to read and update the state.