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"
Install for Vue npm install @effect-atom/atom-vue effect vue
Peer dependencies The Vue package requires:
effect ^3.19 - The Effect library
vue ^3.4 - Vue 3.4 or higher
Import from the package import { Atom , useAtomValue , useAtomSet , useAtom } from "@effect-atom/atom-vue"
Install for Solid npm install @effect-atom/atom-solid effect solid-js
Peer dependencies The Solid package requires:
effect ^3.19 - The Effect library
solid-js >=1 2 - Solid 1.x
Import from the package import { Atom , useAtomValue , useAtomSet , useAtom } from "@effect-atom/atom-solid"
Optional dependencies
Depending on which features you use, you may need additional Effect 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:
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:
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 >
}
< script setup lang = "ts" >
import { Atom , useAtomValue } from "@effect-atom/atom-vue"
const testAtom = Atom . make ( "Hello, Effect Atom!" )
const value = useAtomValue ( testAtom )
</ script >
< template >
< div > {{ value }} </ div >
</ template >
import { Atom , useAtomValue } from "@effect-atom/atom-solid"
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:
{
"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