V

valtio

by @hairyfv
4.2(59)

专为React和原生JavaScript提供Valtio代理状态管理方案,简化前端状态逻辑。

valtiostate-managementreact-stateproxy-based-statefrontend-developmentGitHub
安装方式
npx skills add hairyf/skills --skill valtio
compare_arrows

Before / After 效果对比

1
使用前

在React或原生JavaScript项目中,复杂的状态管理常导致代码冗余和逻辑混乱。组件间数据同步困难,调试复杂,影响开发效率。

使用后

运用此技能,能够利用Valtio代理状态管理,简化React和原生JS应用。实现响应式数据流,减少样板代码,显著提升开发效率和代码可维护性。

SKILL.md

Valtio makes proxy-state simple for React and vanilla JavaScript. It provides a minimal, flexible, and unopinionated API that turns objects into self-aware proxies, enabling fine-grained subscription and reactivity. Valtio shines at render optimization in React and is compatible with Suspense and React 18+.

The skill is based on Valtio v2.3.0, generated at 2026-01-29.

Core References

TopicDescriptionReference
ProxyCreate reactive state objects that track changescore-proxy
useSnapshotReact hook for render-optimized state accesscore-use-snapshot
SnapshotCreate immutable snapshots for comparison and Suspensecore-snapshot
SubscribeSubscribe to state changes from anywherecore-subscribe

Utils

TopicDescriptionReference
proxyMapObservable Map-like proxy for Map data structuresutils-proxy-map
proxySetObservable Set-like proxy for Set data structuresutils-proxy-set
subscribeKeySubscribe to changes of a specific propertyutils-subscribe-key
DevToolsRedux DevTools Extension integrationutils-devtools
RefCreate unproxied references for special objectsutils-ref

Guides

TopicDescriptionReference
Component StateIsolate component state using useRefguides-component-state
Computed PropertiesCreate computed properties with getters and settersguides-computed-properties
AsyncWork with promises and React Suspenseguides-async

Best Practices

TopicDescriptionReference
ActionsOrganize actions for mutating statebest-practices-actions
PersistencePersist state to localStorage or other storagebest-practices-persistence
State CompositionSplit and compose states for organizationbest-practices-state-composition

用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量652
评分4.2 / 5.0
版本
更新日期2026年5月23日
对比案例1 组

用户评分

4.2(59)
5
36%
4
51%
3
14%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月16日
最后更新2026年5月23日