Components

<Index>

Edit this page

Migration

// 1.x
<Index each={state.list} fallback={<div>Loading...</div>}>
{(item, index) => (
<div>
#{index} {item()}
</div>
)}
</Index>
// 2.0
<For each={state.list} keyed={false} fallback={<div>Loading...</div>}>
{(item, index) => (
<div>
#{index()} {item()}
</div>
)}
</For>

Note that in Solid 2.0, both item and index are accessor functions in <For> — call item() and index() to read values.

See the <For> reference for full documentation.

Report an issue with this page