jotai-expert

Guide Jotai atom design and usage for React state management.

Updated Dec 21, 2025
One-click install
npx skills add https://github.com/s-hiraoku/harnesses-factory --skill jotai-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jotai-expert
Source: https://github.com/s-hiraoku/harnesses-factory/tree/main/plugins/jotai-expert/skills/jotai-expert
Command: npx skills add https://github.com/s-hiraoku/harnesses-factory --skill jotai-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill guides developers to solve advanced React state management challenges by applying expert Jotai patterns, improving modularity, maintainability, and performance across complex apps.

Core Features & Use Cases

  • Atom design & refactor: Use derived, async, and action atoms to build robust state layers.
  • Derived & async atoms: Design and compose atoms for asynchronous data and derived values.
  • Performance & persistence: Implement optimization patterns like selectAtom, splitAtom, and persistence with localStorage.
  • Testing patterns: Establish testability with stable atom references and mock hydration.

Quick Start

Start with a small example: define a user atom, a derived theme atom, and a persistence atom that saves to localStorage, then render a component that toggles a setting.

Frequently Asked Questions about jotai-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage complex React state with Jotai atoms and derived values?

Manage complex React state using Jotai by composing derived, async, and action atoms to build modular state layers. This approach improves maintainability and separates concerns across your application's state architecture.

What's the best way to persist Jotai atoms to localStorage in a React app?

Persist Jotai atoms to localStorage by implementing persistence patterns within your atom definitions. This skill provides guidance on integrating localStorage and sessionStorage to maintain state across page reloads and sessions.

How do I optimize Jotai performance for large lists using selectAtom and splitAtom?

Optimize Jotai performance for large lists using selectAtom and splitAtom patterns. These utilities prevent unnecessary re-renders by splitting atom arrays into individual atoms and selecting specific slices of state.

Can I use atomFamily in Jotai to dynamically generate atoms for React components?

Use atomFamily in Jotai to dynamically generate atoms based on parameters, enabling parameterized state management for React components. This pattern is useful for managing collections of similar state items efficiently.

How do I type async Jotai atoms with TypeScript in a React project?

Type async Jotai atoms with TypeScript by defining explicit type annotations for your atom definitions and their resolved values. This skill covers TypeScript typings across derived, async, and action atoms.

How do I test React components that use Jotai state management?

Test React components using Jotai by establishing testability with stable atom references and mock hydration. This approach ensures predictable state during tests without coupling components to specific atom implementations.