Skip to content

Installation

Prerequisites

effstate requires:

  • Node.js 18+
  • TypeScript 5.0+
  • Effect 3.0+

Install the Core Package

Terminal window
npm install effstate effect
pnpm add effstate effect
yarn add effstate effect

React Integration (Optional)

If you’re using React, install the React integration package:

Terminal window
npm install @effstate/react @effect-atom/atom-react
pnpm add @effstate/react @effect-atom/atom-react
yarn add @effstate/react @effect-atom/atom-react

TypeScript Configuration

effstate works best with strict TypeScript settings. We recommend:

{
"compilerOptions": {
"strict": true,
"exactOptionalPropertyTypes": true,
"noUncheckedIndexedAccess": true
}
}

Next Steps

Now that you have effstate installed, check out the Quick Start guide to build your first state machine.