Agent skill

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.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/jotai-reactive-atoms-naporin0624-claude-plugin-hono-e-2

SKILL.md

Jotai Reactive Atoms

Patterns

Pattern Use Case Details
Hybrid Atom Real-time + HTTP fallback HYBRID-ATOM.md
Stream Atom IPC subscriptions EVENT-SUBSCRIPTION.md
Write Atom CRUD mutations 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 and ErrorBoundary

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results