vani-keyed-lists

Installation
SKILL.md

Keyed Lists and Item Updates

Instructions for rendering lists where each row updates independently.

When to Use

Use this when a list needs item-level updates without re-rendering the whole list.

Steps

  1. Represent items by id and store them in a Map or array with stable ids.
  2. Create a row component that reads an item by id.
  3. Use key on each row to preserve identity across reorders.
  4. For item-level updates, choose one:
    • Store a ComponentRef per id and call ref.current?.update() (or ref.current?.update({ onlyAttributes: true }) for class/attr changes).
    • Use signals with text() / attr() for fine-grained row updates.
  5. Call the list handle only when list structure changes (add/remove/reorder).
Related skills
Installs
7
Repository
itsjavi/vani
First Seen
Jan 24, 2026