✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

Stook

npm Coverage Status Minzipped size code style: prettier

A minimalist design state management library for React.

Documentation

The documentation site of stook is hosted at https://stook-cn.now.sh.

Quick start

simplest

import React from 'react'
import { useStore } from 'stook'

function Counter() {
  const [count, setCount] = useStore('Counter', 0)
  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>Click me</button>
    </div>
  )
}

share state

import React from 'react'
import { useStore } from 'stook'

function Counter() {
  const [count, setCount] = useStore('Counter', 0)
  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>Click me</button>
    </div>
  )
}

function Display() {
  const [count] = useStore('Counter')
  return <p>{count}</p>
}

function App() {
  return (
    <div>
      <Counter />
      <Display />
    </div>
  )
}

License

MIT License

Featured Templates

View More
Customer service
Multi-language AI Translator
139 1246
AI Characters
Sarcastic AI Chat Bot
129 2037
AI Engineering
Python Bug Fixer
122 1766
Verified Icon
AI Agents
AI Chatbot Starter Kit
1342 9274
AI Assistants
Talk with Claude 3
160 2068

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.