# Jotai Reactive Atoms

> Implement reactive state management with Jotai atoms in Electron renderer. Use when creating atoms with real-time IPC updates or hybrid stream + HTTP patterns.

- Skill: `naporin0624/jotai-reactive-atoms` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add naporin0624/jotai-reactive-atoms`
- Raw SKILL.md: https://api.skillmd.com/api/skills/naporin0624/jotai-reactive-atoms/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: naporin0624 (https://skillmd.com/u/naporin0624)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/naporin0624/jotai-reactive-atoms

---


# Jotai Reactive Atoms

## Patterns

| Pattern | Use Case | Details |
|---------|----------|---------|
| Hybrid Atom | Real-time + HTTP fallback | [HYBRID-ATOM.md](HYBRID-ATOM.md) |
| Stream Atom | IPC subscriptions | [EVENT-SUBSCRIPTION.md](EVENT-SUBSCRIPTION.md) |
| Write Atom | CRUD mutations | [WRITE-ATOM.md](WRITE-ATOM.md) |

## Key Rules

1. **Hybrid atom getter must NOT be async** - use sync conditional
2. **Always debounce IPC handlers** - prevent UI thrashing
3. **Refresh read atoms after mutations** - `set(singleFetchAtom)`

## Quick Example

```typescript
// Hybrid selector (sync, NOT async)
export const usersAtom = atom((get) => {
  const stream = get(streamAtom);
  return stream !== undefined ? stream.value : get(singleFetchAtom);
});
```

## Related

- [suspense-boundary-design](../suspense-boundary-design/SKILL.md) - Suspense and ErrorBoundary

