
Jotai Expert
This one walks you through Jotai's atomic state management with decision trees for when to use atoms versus useState, which hooks prevent unnecessary rerenders, and how to handle lists and large objects efficiently. It covers splitAtom for independent list items, selectAtom for granular subscriptions, and loadable for async states without Suspense boundaries. The reference stability section alone will save you from the classic mistake of creating atoms inside components. Strong on performance patterns and TypeScript integration. If you're already using Jotai and hitting rerender issues or wondering whether to reach for atomFamily versus atoms-in-atom, this gives you the practical guidance to make that call.
- skills.sh installs
- 204
- last updated
- Aug 21, 2026
Install
$ npx -y skills add s-hiraoku/skills-factory --skill jotai-expert --agent claude-codeInstalls into .claude/skills of the current project.
Files
Jotai Expert
Jotai is a primitive and flexible state management library for React using an atomic approach. Always reference https://jotai.org/ for the latest API details.
Decision Tree
Need state management?
├── Simple local state → useState (no Jotai needed)
├── Shared state across components
│ ├── Few components, same tree → Context may suffice
│ └── Many components, complex → Use Jotai ✓
└── Global app state → Use Jotai ✓
Choosing atom type:
├── Static value → atom(initialValue)
├── Computed from other atoms → atom((get) => ...)
├── Need to modify other atoms → atom(null, (get, set) => ...)
├── Persist to storage → atomWithStorage()
├── List of items → splitAtom() or atoms-in-atom
└── Parameterized data → atomFamily()
Performance issue?
├── Component re-renders too often
│ ├── Only reading? → useAtomValue
│ ├── Only writing? → useSetAtom
│ ├── Large object? → selectAtom / focusAtom
│ └── List items? → splitAtom
└── Async loading states → loadable() or manual loading atoms
Core Patterns
Atom Types
import { atom } from 'jotai'
// 1. Primitive: holds value
const countAtom = atom(0)
Sponsors
Details
- Repository
- github.com/s-hiraoku/skills-factory
- Categories
- Frontend Development, Code Review & Quality, Debugging
- First seen
- Jun 3, 2026