Function Indexed
pub fn Indexed<T, U, List, F>(props: IndexedProps<T, U, List, F>) -> View
Expand description
Non keyed iteration (or keyed by index).
Use this instead of directly rendering an array of
View
s. Using this will minimize re-renders instead of re-rendering every single
node on every state change.
For keyed iteration, see Keyed
.
ยงExample
let fib = create_signal(vec![0, 1, 1, 2, 3, 5, 8]);
view! {
ul {
Indexed(
list=fib,
view=|x| view! {
li { (x) }
},
)
}
}