Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tim-smart/effect-atom/llms.txt

Use this file to discover all available pages before exploring further.

Effect Atom provides framework-specific packages for React, Vue, and Solid. Each package includes the core @effect-atom/atom library and framework-specific hooks.

Choose your framework

Install for React

npm install @effect-atom/atom-react effect react scheduler

Peer dependencies

The React package requires:
  • effect ^3.19 - The Effect library
  • react >=18 20 - React 18 or 19
  • scheduler * - React’s scheduler package
React 18 or higher is required for concurrent features. Effect Atom works with both React 18 and 19.

Import from the package

import { Atom, useAtomValue, useAtomSet, useAtom } from "@effect-atom/atom-react"

Optional dependencies

Depending on which features you use, you may need additional Effect packages:

Platform packages

For browser integrations (localStorage, fetch, etc.):
npm install @effect/platform @effect/platform-browser
Required for:
  • Atom.kvs (localStorage integration)
  • AtomHttpApi (HTTP API client)
  • BrowserKeyValueStore
  • FetchHttpClient

RPC package

For RPC client integration:
npm install @effect/rpc
Required for:
  • AtomRpc module
  • RPC client atoms

Experimental package

For reactivity features:
npm install @effect/experimental
Required for:
  • Atom.withReactivity - Query invalidation
  • Reactivity service integration

Verify installation

Create a simple test file to verify everything is installed correctly:
test.tsx
import { Atom, useAtomValue } from "@effect-atom/atom-react"

const testAtom = Atom.make("Hello, Effect Atom!")

export function Test() {
  const value = useAtomValue(testAtom)
  return <div>{value}</div>
}

TypeScript configuration

Effect Atom works best with TypeScript. Add these settings to your tsconfig.json:
tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "moduleResolution": "bundler",
    "module": "ESNext",
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "jsx": "react-jsx", // or "preserve" for Vue
    "skipLibCheck": true
  }
}

Next steps

Quickstart

Build your first application with Effect Atom

Core concepts

Learn the fundamentals of atoms and effects

Build docs developers (and LLMs) love