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
- Represent items by id and store them in a
Mapor array with stable ids. - Create a row component that reads an item by id.
- Use
keyon each row to preserve identity across reorders. - For item-level updates, choose one:
- Store a
ComponentRefper id and callref.current?.update()(orref.current?.update({ onlyAttributes: true })for class/attr changes). - Use signals with
text()/attr()for fine-grained row updates.
- Store a
- Call the list handle only when list structure changes (add/remove/reorder).
Related skills
More from itsjavi/vani
vani-spa-setup
Create a minimal Vani SPA root with explicit updates
8vani-jsx-setup
Configure and use JSX with Vani while keeping runtime behavior explicit
8vani-scheduling
Schedule explicit updates with microtasks and transitions
8vani-spa-app
Updates Vani SPA app UI in src/spa-app, especially the landing page/homepage and landing examples.
8vani-ssr-hydration
Implement SSR, hydration, and selective activation with Vani
8vani-async-client-only
Use async components, fallbacks, and client-only islands
8