Statio is an extremely lightweight, lightning-fast state management library for React.
Zero unnecessary re-renders. Full TypeScript support. Productive in 5 minutes.
Built for developers who value performance, simplicity, and type safety.
Only 2.1kB gzipped. That's 1/10 the size of Redux. Zero bloat, zero dependencies.
Selective subscriptions eliminate unnecessary re-renders. Components only update when their specific state slice changes.
Simple mental model. No boilerplate, no actions, no reducers. Just state and updates. Productive in under 5 minutes.
const count = useStore(s => s.count)
store.set({ count: count + 1 })Highly extensible architecture. Add persistence, devtools, logging, or custom middleware. Scales from prototypes to production.
Built with TypeScript from the ground up. Full type inference, autocomplete, and compile-time safety out of the box.
type State = { count: number }
// Full type inference ✓Subscription-based updates with automatic dependency tracking. No manual optimization needed.
Clean API. Full type safety. Zero configuration.
npm install statioconst store = createStore({
count: 0,
user: null
})
store.set({ notifications: newNotifications })
const currentUser = store.get("currentUser")
store.subscribe("cartItems", (items) => {
console.log(`장바구니에 ${items.length}개 상품이 있습니다`)
})const [todos, setTodos] = useStatio("todoList", [])
const addTodo = (text: string) => {
setTodos([...todos, { id: Date.now(), text, done: false }])
}
return (
<div>
{todos.map(todo => (
<TodoItem key={todo.id} todo={todo} />
))}
<AddTodo onAdd={addTodo} />
</div>
)
}function TypeInference() {
const [count, setCount] = useStatio("counter", 0)
const [user, setUser] = useStatio("user", {
name: "Bob",
age: 25,
})
return (
<div>
<p>Count: {count}</p>
<p>Name: {user.name}</p>
</div>
)
}
// count is automatically inferred as number type
// user is automatically inferred as { name: string; age: number } type
// Perfect type safety without explicit type definitionsDesigned to eliminate unnecessary re-renders through selective subscriptions.
Components subscribe only to the specific state slices they need via selector functions.
const count = useStore(store, s => s.count) // Only subscribes to countStatio tracks which state properties your selector accesses and only triggers updates when those change.
{ user: newUser }s.user re-renders.count skip renderSelector results are compared using shallow equality. If the result hasn't changed, no re-render occurs.