Module state

Module state 

Source

Structs§

State

Enums§

ReadState
Given a type T you may pass an owned value, a State<T> or a function returning a ReadRef<T>
ReadStateCow

Traits§

MutView

Functions§

use_state
Creates a reactive value initialized with the returned value of the init callback that we pass to it. A State<T> is a combination of Rc<RefCell<T>> + Copy and reactive semantics. It allow us to store a value into a reactive pointer and share this to other components to let them read or even write to it.

Type Aliases§

ReadRef
WriteRef