Stook
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
Stook
Project Details
- Zwe1/stook
- MIT License
- Last Updated: 4/27/2024
Recomended MCP Servers
Solana Model Context Protocol (MCP) Demo
A powerful MCP memory using a knowledge graph powered by elastic search
Weather MCP server
Monorepo providing 1) OpenAPI to MCP Tool generator 2) Exposing all of Twilio's API as MCP Tools
An MCP for integrating kuberentes with Generative AI
Flutter ChatGPT APP. The chatgpt chat app implemented by flutter supports custom modes and contextual continuous dialogue. In...
A Model Context Protocol (MCP) server that provides access to the Art Institute of Chicago Collection through natural...
Ecovacs MCP Server
基于MCP(Model Context Protocol)协议的飞书项目管理工具
Houdini integration through the Model Context Protocol





