Skip to content

Instantly share code, notes, and snippets.

View Chudesnov's full-sized avatar

Alexander Chudesnov Chudesnov

View GitHub Profile
@Chudesnov
Chudesnov / effector.md
Last active February 13, 2024 17:53 — forked from ilyalesik/effector.md
Article "Why did I choose Effector instead of Redux or MobX?"

Effector is a brand new reactive state manager. Its ambitious team aims to solve all the problems that existing solutions have. Writing the core of the library from scratch took several attempts across six months, and recently the team released the first stable release.

In this article, I will show why I prefer using Effector for my new projects instead of other state managers. Let's get started with the Effector API.

Basics

Effector uses two concepts you might already be familiar with: store and event.

A store is an object that holds some value. We can create stores with the createStore helper:

import {createStore} from 'effector'