valtio

Manage React and non-React state with proxy-based mutable stores.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/gil00pita/lanify --skill valtio-gil00pita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: valtio
Source: https://github.com/gil00pita/lanify/tree/main/.agents/skills/valtio
Command: npx skills add https://github.com/gil00pita/lanify --skill valtio-gil00pita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Valtio provides proxy-based state management that lets you write mutations directly on a proxy store while React observes and re-renders only the parts that changed.

Core Features & Use Cases

  • Proxy-based state management that makes React state feel like plain JavaScript.
  • Readable, efficient reactivity via useSnapshot and subscribe, with updates that occur only when accessed properties change.
  • Works with or without React, enabling state management in non-UI logic, data stores, and utilities.

Quick Start

Install valtio, create a proxy store, and use useSnapshot to read and react to changes.

Frequently Asked Questions about valtio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does proxy-based state management work in React?

Proxy-based state management uses JavaScript proxies to let you mutate state directly while React observes changes and triggers fine-grained re-renders only for components accessing the modified properties.

How do I create a mutable store and read its state?

Create a mutable store using the proxy utility, then read state via the useSnapshot hook in React components or the subscribe function in non-UI JavaScript contexts to observe property changes.

Can I use this state management approach outside of React?

Yes, this proxy-based state management works with or without React. You can manage state in non-UI logic, data stores, and utilities using the subscribe or watch utilities to observe changes.

What is the best way to prevent unnecessary re-renders when managing mutable state?

To prevent unnecessary re-renders with mutable state, use selective subscriptions via useSnapshot. This ensures React components only update when the specific properties they access actually change.

How do I compute derived values from a proxy store?

You can derive computed values from a proxy store by using the watch utility or subscribe function to observe state changes and automatically recalculate derived data when accessed properties mutate.

Do I need any specific dependencies to use valtio for state management?

No external dependencies are required. You only need to install valtio itself to create proxy stores and use hooks like useSnapshot or utilities like subscribe to handle reactivity.