Module dioxus_core::prelude

source ·
Expand description

The purpose of this module is to alleviate imports of many common types

This includes types like Scope, Element, and Component.

Structs

  • A wrapper around some generic data that handles the event’s state
  • A concrete type provider for closures that build VNode structures.
  • A component’s unique identifier.
  • A component’s state separate from its props.
  • A wrapper around a component’s ScopeState and properties. The ScopeState 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

Traits

  • A value that can be converted into an attribute value
  • 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 the Properties 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.
  • This utility function launches the builder method so rsx! and html! macros can use the typed-builder pattern to initialize a component’s props.

Type Definitions