Expand description
This module contains bindings to React hooks.
Structs§
- Deferred
Value - Allows access to the underlying deferred value persisted with
use_deferred_value()
. - Deps
- This struct specifies dependencies for certain hooks.
- JsRef
Container - Allows access to the underlying JS data persisted with
use_js_ref()
. - Memo
- Allows access to the underlying memoized data persisted with
use_memo()
. - RefContainer
- Allows access to the underlying data persisted with
use_ref()
. - State
- Allows access to the underlying state data persisted with
use_state()
. - Transition
- Allows access to the transition state.
Traits§
- Into
Destructor - Denotes types that can be used as destructors for effects.
Functions§
- use_
callback - Returns a memoized callback.
- use_
context - Allows access to the current context value of the given context.
- use_
deferred_ value - Returns the given value, or in case of urgent updates, returns the previous value given.
- use_
effect - Runs a function which contains imperative code that may cause side-effects.
- use_id
- Returns a unique component ID which is stable across server and client.
- use_
js_ ref - This hook can persist JS data through the entire lifetime of the component.
- use_
layout_ effect - Same as
use_effect()
, but it fires synchronously after all DOM mutations. - use_
memo - Returns a persisted, memoized value.
- use_ref
- This is the main hook for persisting Rust data through the entire lifetime of the component.
- use_
state - Persist stateful data of the component.
- use_
transition - Returns a stateful value for the pending state of the transition, and a function to start it.