Build scalable lists with keyed rows and per-item updates
Instructions for rendering lists where each row updates independently.
Use this when a list needs item-level updates without re-rendering the whole list.
Map or array with stable ids.key on each row to preserve identity across reorders.ComponentRef per id and call ref.current?.update() (or
ref.current?.update({ onlyAttributes: true }) for class/attr changes).text() / attr() for fine-grained row updates.Item)List)Map (defaults to true)Example 1 usage pattern:
Implement a todo list with keyed rows and per-row updates on toggle.
Example 2 usage pattern:
Reorder items by id while preserving row identity with key.
Example output:
Created: src/list.ts
Notes: Row updates call ref.current?.update() or use signals.
name: vani-keyed-lists description: Build scalable Vani lists with keyed rows and per-item updates. argument-hint: "[list feature]"
Use this skill when building lists or collections that require efficient updates.
Follow these steps:
Row component and pass key, ref, and item accessors.ref.current?.update() or signals with text() / attr().ComponentRef or signals for per-row updates.update({ onlyAttributes: true }) for class/attr-only changes.