Struct sycamore::flow::Keyed [−][src]
pub struct Keyed<G: GenericNode> { /* fields omitted */ }
Expand description
Keyed iteration. Use this instead of directly rendering an array of Template
s.
Using this will minimize re-renders instead of re-rendering every single node on every state
change.
For non keyed iteration, see Indexed
.
Example
use sycamore::prelude::*; let count = Signal::new(vec![1, 2]); let node = template! { Keyed(KeyedProps { iterable: count.handle(), template: |item| template! { li { (item) } }, key: |item| *item, }) };
Trait Implementations
Auto Trait Implementations
impl<G> RefUnwindSafe for Keyed<G> where
G: RefUnwindSafe,
impl<G> UnwindSafe for Keyed<G> where
G: UnwindSafe,