Jotai Atom Explorer
Design your Jotai atom structure visually. Add primitive atoms, build derived atoms with dependencies, and generate clean TypeScript code with usage examples.
Primitive Atoms
Derived Atoms
Dependency Graph
Generated Code
Frequently Asked Questions
What is Jotai?▼
Jotai is a primitive, flexible atomic state management library for React. The word 'jotai' means 'state' in Japanese. Unlike Zustand (store-based) or Redux (global reducer), Jotai builds state from small atomic units called atoms. Components subscribe to specific atoms, and only re-render when those atoms change — naturally preventing unnecessary updates.
What is an atom in Jotai?▼
An atom is the smallest unit of state in Jotai. You create one with atom(initialValue). Any component can read and write it with useAtom(atomName), similar to React's useState. Atoms are stored in a Provider (or default global store) and automatically garbage collected when no components subscribe to them.
What is a derived atom?▼
A derived atom computes its value from other atoms. Create one by passing a read function to atom(): const derivedAtom = atom(get => get(countAtom) * 2). Derived atoms are read-only by default. For read-write derived atoms, pass both read and write functions. They memoize and only recompute when their dependencies change.
What is atomWithStorage?▼
atomWithStorage is a utility from jotai/utils that synchronizes atom state with localStorage, sessionStorage, or AsyncStorage. Import it and use: const themeAtom = atomWithStorage('theme', 'light'). The value persists across page reloads and syncs across tabs. It also handles serialization automatically.
How does Jotai differ from Recoil?▼
Both use the atomic model. Jotai is simpler: no atom keys required (preventing key conflicts), smaller bundle (~3KB vs ~20KB for Recoil), and better TypeScript support. Recoil has more built-in utilities (selectors, effects, snapshots) but is Facebook-specific and less actively maintained. Jotai is generally preferred for new projects.
When should I use Jotai vs Zustand?▼
Use Jotai when you have many small, independent state pieces with fine-grained subscriptions — like individual UI elements, feature flags per component, or derived computed values. Use Zustand when you have domain state with actions (e.g., a shopping cart, auth store) where related state and logic belong together. They can coexist in the same app.
Related Products
on GumroadDevPlaybook Interview Vault
210+ real technical interview questions with model answers, asked at Google, Meta, Amazon, Microsoft, Stripe, and Shopify. Covers Frontend (55), Backend (55), System Design (50), and DSA (50). Available in English and Traditional Chinese.
Buy on Gumroad →TypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →Developer Interview Vault
210 technical interview questions with model answers, key points, and follow-up questions. Covers Frontend, Backend, System Design, and DSA — bilingual English + Traditional Chinese (ZH-TW). PWYW from $29.
Buy on Gumroad →You Might Also Need
SQL to TypeScript Types
Convert SQL CREATE TABLE statements to TypeScript interfaces and Zod schemas. Maps SQL column types to TypeScript with nullability.
Open free tool →
TanStack Query Config Builder
Configure TanStack Query (React Query v5) staleTime and gcTime visually. Generate QueryClient config and useQuery/useMutation TypeScript code with retry logic.
Open free tool →
TypeScript Discriminated Union Builder
Build TypeScript discriminated unions visually. Add variants with fields and get type-safe switch statements, type guards, and exhaustive checking code.
Open free tool →
More Free Tools
Related Articles
React State Management in 2026: Beyond Redux
Explore the modern landscape of React state management in 2026 — from useState and Context to Zustand, Jotai, TanStack Query, and when to use each approach.
Zustand vs Jotai vs Recoil vs Nano Stores: React State Management 2026
Deep comparison of Zustand, Jotai, Recoil, and Nano Stores for React state management in 2026 — bundle size, boilerplate, TypeScript, devtools, performance, and real code examples.
React 19: Complete Guide to New Features in 2026
Everything new in React 19: use() hook, Actions, optimistic updates, ref as prop, form actions, and the React Compiler. Production-ready patterns with TypeScript examples.
React Hooks in 2026: Advanced Patterns and Best Practices
Master React Hooks in 2026 with advanced patterns for state management, side effects, performance optimization, and building custom hooks that scale.
React Query + Zustand: The Server/Client State Separation Pattern in 2026
Stop fighting your state management. Learn how to correctly separate server state (React Query) from client state (Zustand) in React apps. Covers the mental model, integration patterns, optimistic updates, and architecture decisions for 2026.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →