Module consecuit::hooks [−][src]
Expand description
Essential hooks you can build other hooks with.
Structs
Reference | A reference with interior mutability. Somewhat like RefCell. Returned by use_ref. |
Updater | A handle returned by use_state for updating the state. |
Functions
use_effect | Runs the function with the arg as argument when the arg changes. |
use_effect_relaxed | Like use_effect, but takes a closure instead of a function. |
use_memo | Memoize the computation. |
use_memo_relaxed | Like use_memo, but takes a closure instead of a function. |
use_ref | Use a Reference. |
use_state | Use a state. The given value will be the default. |
use_state_from | Use a state. The given closure will be used to create the initial value. |