Module dioxus_core::prelude
source · Expand description
Re-exports
pub use crate::innerlude::AnyValue;
pub use crate::innerlude::EventHandler;
Structs
- A wrapper around some generic data that handles the event’s state
- A concrete type provider for closures that build
VNode
structures. - A global runtime that is shared across all scopes that provides the async runtime and context API
- A gaurd for a new runtime. This must be used to override the current runtime when importing components from a dynamic library that has it’s own runtime.
- A component’s unique identifier.
- A component’s state separate from its props.
- A wrapper around a component’s
ScopeState
and properties. TheScopeState
provides the majority of methods for the VirtualDom and component state. - A task’s unique identifier.
- A static layout of a UI tree that describes a set of dynamic and static nodes.
- A reference to a template along with any context needed to hydrate it
- A virtual node system that progresses user events and diffs UI trees.
Enums
- An attribute of the TemplateNode, created at compile time
- A statically known node in a layout.
Traits
- A value that can be converted into an attribute value
- A trait that allows various items to be converted into a dynamic node for the rsx macro
- Every “Props” used for a component must implement the
Properties
trait. This trait gives some hints to Dioxus on how to memoize the props and some additional optimizations that can be made. We strongly encourage using the derive macro to implement theProperties
trait automatically as guarantee that your memoization strategy is safe. - A trait to allow results to be thrown upwards to the nearest Error Boundary
Functions
- Create inline fragments using Component syntax.
- Consume context from the current scope
- Consume context from the current scope
- Get the current scope id
- This utility function launches the builder method so rsx! and html! macros can use the typed-builder pattern to initialize a component’s props.
- Check if the current scope has a context
- Provide context to the current scope
- Provide context to the the given scope
- Provide a context to the root scope
- Pushes the future onto the poll queue to be polled after the component renders.
- Informs the scheduler that this task is no longer needed and should be removed.
- Schedule an update for any component given its
ScopeId
. - Spawns the future but does not return the
TaskId
- Spawn a future that Dioxus won’t clean up when this component is unmounted
- Suspends the current component
- Throw an error into the nearest error boundary
Type Aliases
- A wrapper around the
Scoped
object that contains a reference to theScopeState
and properties for a given component.