use_state

Function use_state 

Source
pub fn use_state<T>(
    initial_value_fn: impl FnOnce() -> T,
) -> (impl Fn() + Clone, impl Fn(T) + Clone)
where T: Clone + 'static,
Expand description

Provides a piece of state for a component.