What problem does it solve?
This Skill provides guidance on structuring data within Zustand stores for optimal performance, including handling list and detail pages, caching, and optimistic updates.
Core Features & Use Cases
- Separate List and Detail: Offers best practices for designing separate data structures for list and detail pages.
- Map vs Array Usage: Explains when to use a Map for detail data caching and a simple array for list data.
- State Structure Pattern: Describes a pattern for structuring state for benchmarks, including lists, details, and loading states.
- Reducer Pattern: Details how to implement a reducer for detail map optimistic updates.
- Component Usage: Provides examples of how to access list and detail data in components.
- Decision Tree: A visual guide to choosing between using a Map or Array for data storage.
- Checklist: A comprehensive checklist for designing store state structure.
- Best Practices: Recommendations for organizing files, naming conventions, and avoiding common mistakes.
Quick Start
Implement the store data structures for a benchmark slice in your Zustand store.