store-data-structures

Installation
SKILL.md

LobeHub Store Data Structures

How to structure data in Zustand stores for fast list rendering, multi-detail caching, and ergonomic optimistic updates.

Core Principles

✅ DO

  1. Separate List and Detail — different structures for list pages and detail pages
  2. Use Map for Details — cache multiple detail pages with Record<string, Detail>
  3. Use Array for Lists — simple arrays for list display
  4. Types from @lobechat/types — never use @lobechat/database types in stores
  5. Distinguish List and Detail types — List types may have computed UI fields

❌ DON'T

Installs
6
GitHub Stars
79.5K
First Seen
Apr 8, 2026
store-data-structures — lobehub/lobe-chat