Installation
- npm
- yarn
- pnpm
- deno
npm install effector@^22
yarn add effector@^22
pnpm add effector@^22
Import effector.mjs
from any CDN
import {createStore} from 'https://esm.sh/effector@22'
effector 21.0.0
Complementary packages
For react
- npm
- yarn
- pnpm
npm install effector effector-react@^22
yarn add effector effector-react@^22
pnpm add effector effector-react@^22
For vue
- npm
- yarn
- pnpm
npm install effector effector-vue@^22
yarn add effector effector-vue@^22
pnpm add effector effector-vue@^22
For solid
- npm
- yarn
- pnpm
npm install effector effector-solid@^0.22
yarn add effector effector-solid@^0.22
pnpm add effector effector-solid@^0.22
For svelte
Svelte works with effector out of the box, no additional packages needed. See word chain game application written with svelte and effector.
DevTools
Use effector-logger for printing updates to console, displaying current store values with browser ui and connecting application to familiar redux devtools
Online playground
Examples in this documentation are running in our online playground, which allows someone to test and share ideas quickly, without install. Code sharing, Typescript and react supported out of the box
Compatibility
The library provides separate modules with compatibility up to IE11 and Chrome 47 (browser for Smart TV devices): effector/compat
, effector-react/compat
and effector-vue/compat
Usage with manual import replacement:
- import {createStore} from 'effector'
+ import {createStore} from 'effector/compat'
Usage with babel-plugin-module-resolver:
{
"plugins": [
["babel-plugin-module-resolver", {
"alias": {
"^effector$": "effector/compat",
"^effector-react$": "effector-react/compat"
}
}]
]
}
Polyfills
You need to install polyfills for these objects:
Promise
Object.assign
Array.prototype.flat
Map
Set