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.
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
- Hybrid atom getter must NOT be async - use sync conditional
- Always debounce IPC handlers - prevent UI thrashing
- Refresh read atoms after mutations -
set(singleFetchAtom)
Quick Example
// 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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?