跳到主要内容

Installation

npm install effector@^22

Complementary packages

For react

npm install effector effector-react@^22

For vue

npm install effector effector-vue@^22

For solid

npm install 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

Project repository

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:

.babelrc
{
"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