Crate dioxus_hooks

source ·

Modules

Macros

Structs

  • An error returned by [RefCell::try_borrow].
  • An error returned by [RefCell::try_borrow_mut].
  • Wraps a borrowed reference to a value in a RefCell box. A wrapper type for an immutably borrowed value from a RefCell<T>.
  • A clone of the standard library’s RefCell type.
  • A wrapper type for a mutably borrowed value from a RefCell<T>.
  • Selector state is state that is derived from tracked state
  • Tracked state is state that can drive Selector state
  • A mutable reference to tracked state
  • The receiving end of an unbounded mpsc channel.
  • The transmission end of an unbounded mpsc channel.
  • A type created by the use_ref hook. See its documentation for more details.
  • State that is shared between components through the context system

Enums

Traits

Functions

  • Consume some context in the tree, providing a sharable handle to the value
  • Provide some context via the tree and return a reference to it
  • Maintain a handle over a future that can be paused, resumed, and canceled.
  • Get a handle to a coroutine higher in the tree
  • A hook that provides a future that executes after the hooks have been applied
  • A future that resolves to a value.
  • A hook that provides a callback that executes if the dependencies change. This is useful to avoid running computation-expensive calculations even when the data doesn’t change.
  • Creats a callback that will be run before the component is removed. This can be used to clean up side effects from the component (created with use_effect)
  • use_ref is a key foundational hook for storing state in Dioxus.
  • This hook provides some relatively light ergonomics around shared state.
  • Provide some state for components down the hierarchy to consume without having to drill props. See use_shared_state to consume the state
  • Store state between component renders.
  • Create a new tracked state. Tracked state is state that can drive Selector state