Skip to main content

UseState

Trait UseState 

Source
pub trait UseState: Sealed {
    // Required method
    fn use_state<T, F>(&mut self, init: F) -> State<T>
       where F: FnOnce() -> T,
             T: Unpin + Send + Sync + 'static;
}

Required Methods§

Source

fn use_state<T, F>(&mut self, init: F) -> State<T>
where F: FnOnce() -> T, T: Unpin + Send + Sync + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl UseState for Hooks<'_, '_>