V
valtio-define
by @hairyfv
4.2(20)
Valtioの状態を定義および管理するための`valtio-define`の包括的な使用スキルを習得します。
インストール方法
npx skills add hairyf/skills --skill valtio-definecompare_arrows
Before / After 効果比較
1 组使用前
Valtioで状態管理を行う際、その高度な使い方に不慣れだと、状態定義が混乱する可能性があります。コードの可読性が低く、保守や拡張が困難になり、開発効率に影響を与えます。
使用後
このスキルを適用することで、valtio-defineの利用法とベストプラクティスを完全に習得できます。状態定義を最適化し、コードの明瞭さと保守性を向上させ、効率的で安定した状態管理を保証します。
SKILL.md
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 |
| Patch | Update state with patch operations | advanced-patch |
| Signal | JSX component for inline reactive values | advanced-signal |
| Store to State | Convert store to useState-like hooks | advanced-store-to-state |
Features
| Topic | Description | Reference |
|---|---|---|
| Plugin System | Extend stores with plugins | feature-plugin-system |
| Persistent Plugin | Persist state to storage | feature-persistent-plugin |
Quick Start
import { defineStore, useStore } from 'valtio-define'
const store = defineStore({
state: () => ({ count: 0 }),
actions: {
increment() { this.count++ },
},
getters: {
doubled() { return this.count * 2 },
},
})
function Counter() {
const state = useStore(store)
return (
<div>
<div>Count: {state.count}</div>
<div>Doubled: {state.doubled}</div>
<button onClick={store.increment}>Increment</button>
</div>
)
}
ユーザーレビュー (0)
レビューを書く
効果
使いやすさ
ドキュメント
互換性
レビューなし
統計データ
インストール数629
評価4.2 / 5.0
バージョン
更新日2026年5月23日
比較事例1 件
ユーザー評価
4.2(20)
5
15%
4
45%
3
35%
2
5%
1
0%
この Skill を評価
0.0
対応プラットフォーム
🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI
タイムライン
作成2026年3月16日
最終更新2026年5月23日