valtio-define
Valtio-based reactive state management with Pinia-like API for React.
- Core API includes
defineStorefor creating stores with state, actions, and getters, plususeStorehook for React component access - Advanced features cover subscriptions, patch operations, inline reactive JSX components via Signal, and conversion to useState-like hooks
- Plugin system enables store extensions, including built-in persistent storage plugin for state hydration
- Full TypeScript support with comprehensive type definitions
Based on valtio-define v1.0.1. A Valtio-based state management library with Pinia-like API for React applications.
Overview
valtio-define provides a factory function for creating reactive stores with state, actions, and getters. Built on top of Valtio, it offers a familiar API similar to Pinia with full TypeScript support.
Core References
| Topic | Description | Reference |
|---|---|---|
| defineStore | Core API for creating reactive stores | core-define-store |
| useStore | React hook for accessing store state | core-use-store |
| Types | TypeScript types and interfaces | core-types |
Advanced Features
| Topic | Description | Reference |
|---|---|---|
| Subscriptions | Subscribe to state changes | advanced-subscribe |
More from hairyf/skills
tailwindcss
Tailwind CSS utility-first CSS framework. Use when styling web applications with utility classes, building responsive designs, or customizing design systems with theme variables.
1.7Khairy-utils
Comprehensive skills for working with @hairy/utils core utilities
891motion
Motion animation library for JavaScript, React and Vue. Use when creating animations, gestures, layout transitions, scroll-linked effects, or working with motion values and animation controls.
763next
Next.js framework for building React applications with App Router, Server Components, and optimized performance. Use when working with Next.js apps, routing, data fetching, caching, Server Actions, or building full-stack React applications.
714react-use
Collection of essential React Hooks for sensors, UI, animations, side-effects, lifecycles, and state management
692valtio
Valtio proxy state management for React and vanilla JavaScript. Use when creating reactive state, managing application state, or working with proxy-based state management.
636