Module freya::prelude

source ·
Expand description

Useful imports.

Re-exports

  • pub use dioxus_hot_reload;
  • pub use crate::launch::*;
  • pub use crate::plugins::*;

Modules

Macros

  • Alias for Cow::Borrowed, because that’s used a million times so shortening it is nice. Makes the code more readable.
  • Example usage:
  • Start the hot reloading server with the current directory as the root
  • The render! macro makes it easy for developers to write jsx-style markup in their components.
  • The rsx! macro makes it easy for developers to write jsx-style markup in their components.
  • Create FooThemeWith structs without having to deal with the verbose syntax.
  • A helper macro for using hooks and properties in async environments.
  • This macro has three arguments separator by commas.
  • A helper macro that merges uses the closure syntax to elaborate the dependency array

Structs

Enums

Constants

Traits

  • A trait for giving a type a useful default value.
  • 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 the Properties trait automatically as guarantee that your memoization strategy is safe.
  • Common trait for editable texts
  • A trait to allow results to be thrown upwards to the nearest Error Boundary

Functions

Type Aliases

Attribute Macros

  • Streamlines component creation. This is the recommended way of creating components, though you might want lower-level control with more advanced uses.
  • Derive props for a component within the component definition.

Derive Macros

  • Derive macro generating an impl of the trait Default.