Struct sycamore::flow::Indexed[][src]

pub struct Indexed<G: GenericNode> { /* fields omitted */ }
Expand description

Non keyed iteration (or keyed by index). Use this instead of directly rendering an array of Templates. Using this will minimize re-renders instead of re-rendering every single node on every state change.

For keyed iteration, see Keyed.

Example

use sycamore::prelude::*;

let count = Signal::new(vec![1, 2]);

let node = template! {
    Indexed(IndexedProps {
        iterable: count.handle(),
        template: |item| template! {
            li { (item) }
        },
    })
};

Trait Implementations

The name of the component (for use in debug mode).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.