V

valtio-define

by @hairyfv
4.2(20)

Valtioの状態を定義および管理するための`valtio-define`の包括的な使用スキルを習得します。

valtioreact-state-managementproxy-based-statefrontend-developmentjavascript-librariesGitHub
インストール方法
npx skills add hairyf/skills --skill valtio-define
compare_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

TopicDescriptionReference
defineStoreCore API for creating reactive storescore-define-store
useStoreReact hook for accessing store statecore-use-store
TypesTypeScript types and interfacescore-types

Advanced Features

TopicDescriptionReference
SubscriptionsSubscribe to state changesadvanced-subscribe
PatchUpdate state with patch operationsadvanced-patch
SignalJSX component for inline reactive valuesadvanced-signal
Store to StateConvert store to useState-like hooksadvanced-store-to-state

Features

TopicDescriptionReference
Plugin SystemExtend stores with pluginsfeature-plugin-system
Persistent PluginPersist state to storagefeature-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日