https://github.com/forsigner/stook
A minimalist design state management library for React.
https://github.com/forsigner/stook
form graphql hooks react redux state-management
Last synced: about 1 year ago
JSON representation
A minimalist design state management library for React.
- Host: GitHub
- URL: https://github.com/forsigner/stook
- Owner: forsigner
- License: mit
- Created: 2019-11-10T01:36:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-10T09:19:21.000Z (about 3 years ago)
- Last Synced: 2025-06-08T08:41:58.778Z (about 1 year ago)
- Topics: form, graphql, hooks, react, redux, state-management
- Language: TypeScript
- Homepage: https://stook.vercel.app/
- Size: 1.89 MB
- Stars: 89
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stook
[](https://www.npmjs.com/package/stook) [](https://coveralls.io/github/forsigner/stook?branch=master) [](https://bundlephobia.com/result?p=stook) [](https://github.com/prettier/prettier)
A minimalist design state management library for React.
## Documentation
The documentation site of stook is hosted at [https://stook.vercel.app](https://stook.vercel.app).
## Quick start
**simplest**
```tsx
import React from 'react'
import { useStore } from 'stook'
function Counter() {
const [count, setCount] = useStore('Counter', 0)
return (
You clicked {count} times
setCount(count + 1)}>Click me
)
}
```
**share state**
```jsx
import React from 'react'
import { useStore } from 'stook'
function Counter() {
const [count, setCount] = useStore('Counter', 0)
return (
You clicked {count} times
setCount(count + 1)}>Click me
)
}
function Display() {
const [count] = useStore('Counter')
return
{count}
}
function App() {
return (
)
}
```
## License
[MIT License](https://github.com/forsigner/stook/blob/master/LICENSE)