valtio-define

Comprehensive skills for working with valtio-define

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "valtio-define" with this command: npx skills add hairyf/skills/hairyf-skills-valtio-define

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>
  )
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

tailwindcss

No summary provided by upstream source.

Repository SourceNeeds Review
752-hairyf
General

hairy-utils

No summary provided by upstream source.

Repository SourceNeeds Review
689-hairyf
General

react-use

No summary provided by upstream source.

Repository SourceNeeds Review
503-hairyf
General

motion

No summary provided by upstream source.

Repository SourceNeeds Review
487-hairyf