Crate leptos_core

Source
Expand description

This crate contains several utility pieces that depend on multiple crates. They are all re-exported in the main leptos crate.

Re-exports§

pub use typed_builder;

Structs§

ForProps
Properties for the For component, a keyed list.
SuspenseProps
Props for the Suspense component, which shows a fallback while Resources are being read.
TransitionProps
Props for the Suspense component, which shows a fallback while Resources are being read.

Traits§

Prop
Describes the properties of a component. This is typically generated by the Prop derive macro as part of the #[component] macro.

Functions§

For
Iterates over children and displays them, keyed by the key function given.
Suspense
If any Resources are read in the children of this component, it will show the fallback while they are loading. Once all are resolved, it will render the children. If data begin loading again, falls back to fallback again.
Transition
If any Resources are read in the children of this component, it will show the fallback while they are loading. Once all are resolved, it will render the children. Unlike Suspense, this will not fall back to the fallback state if there are further changes after the initial load.
map_keyed
Function that maps a Vec to another Vec via a map function. The mapped Vec is lazy computed; its value will only be updated when requested. Modifications to the input Vec are diffed using keys to prevent recomputing values that have not changed.