Socket
Socket
Sign inDemoInstall

effector

Package Overview
Dependencies
0
Maintainers
4
Versions
271
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    effector

The state manager


Version published
Weekly downloads
43K
decreased by-5.78%
Maintainers
4
Install size
899 kB
Created
Weekly downloads
 

Changelog

Source

effector 22.0.0

  • Add support for plain functions to attach: attach({source, async effect(source, params) {}})
  • Allow to use fork without domains: const scope = fork()
    • Unit not found in scope error is no longer exists, any unit could be used in any scope
    • Increase performance of fork and serialize a hundredfold
  • Add support for attached effects to fork handlers
  • Add support for tuples to fork values and handlers: fork({values: [[$user, 'alice'], [$age, 22]]})
  • Add serialize: 'ignore' option to createStore to declare store as ignored by serialize calls
  • Make onlyChanges: true a default serialize option
  • Fix babel plugin issue with parsing method calls (e.g. in react native)
  • Validate combine arguments and throw an error in case of undefined and non-store units (issue #509)
  • Throw an error when fork handlers or values got units without sid or with duplicate sid
  • Deprecate createStoreObject alias for combine
  • Deprecate effector/fork module
  • Deprecate .thru
  • Deprecate second argument in store.map
  • Deprecate direct manipulations with derived units:
    • Deprecate .on in derived stores created by store.map and combine
    • Deprecate calls of derived events created by event.map, event.filterMap and event.filter
    • Deprecate calls of fx.done, fx.doneData and other events belongs to effects
  • Remove ɔ (latin small letter open o) symbol to prevent incorrect unicode parsing
  • Remove undocumented scope.find which is a wrong abstraction for a new fork
  • Make Scope a unit:
    • Add support for Scope to is.unit
    • Add is.scope method
  • Allow to pass a scope to scopeBind: scopeBind(unit, {scope}), which is also can be used outside from .watch
  • Improve es modules support
  • Make package size 10% smaller

Readme

Source

☄️ effector

The state manager

Visit effector.dev for docs, guides and examples

Table of Contents

Introduction

Effector is an effective multi-store state manager for Javascript apps (React/React Native/Vue/Node.js), that allows you to manage data in complex applications without the risk of inflating the monolithic central store, with clear control flow, good type support and high capacity API. Effector supports both TypeScript and Flow type annotations out of the box.

Effector follows five basic principles:

  • Application stores should be as light as possible - the idea of adding a store for specific needs should not be frightening or damaging to the developer.
  • Application stores should be freely combined - data that the application needs can be statically distributed, showing how it will be converted in runtime.
  • Autonomy from controversial concepts - no decorators, no need to use classes or proxies - this is not required to control the state of the application and therefore the api library uses only functions and plain js objects
  • Predictability and clarity of API - a small number of basic principles are reused in different cases, reducing the user's workload and increasing recognition. For example, if you know how .watch works for events, you already know how .watch works for stores.
  • The application is built from simple elements - space and way to take any required business logic out of the view, maximizing the simplicity of the components.

Installation

npm install effector

React

npm install effector effector-react

Vue

npm install effector effector-vue

Svelte

Svelte works with effector out from a box, no additional packages needed. See word chain game application written with svelte and effector.

CDN

Documentation

For additional information, guides and api reference visit our documentation site

Packages

Articles

Community

Online playground

You can try effector in our repl

Code sharing, Typescript and react supported out of the box. REPL repository

DevTools

Use effector-logger for printing updates to console, displaying current store values with ui or connecting application to familiar redux devtools


More examples in documentation

Learn more

Support us

More articles about effector at patreon

Contributors


Dmitry

💬 💻 📖 💡 🤔 🚇 ⚠️

andretshurotshka

💬 💻 📖 📦 ⚠️

Sergey Sova

📖 💡 💻 ⚠️ 🤔

Arutyunyan Artyom

📖 💡

Ilya

📖

Arthur Irgashev

📖 💻 💡

Igor Ryzhov

📖 💻 💡

Egor Guscha
📖

bakugod
📖 💡

Ruslan
📖 💻 🤔 ⚠️

Maxim Alyoshin
📖

Andrey Gopienko
📖

Vadim Ivanov
📖

Aleksandr Anokhin
💻

Anton Kosykh
💻

Konstantin Lebedev
💡

Pavel Tereschenko
💻

Satya Rohith
📖

Vladislav Melnikov
💻

Grigory Zaripov
💻

Marina Miyaoka
💻

Evgeny Zakharov
📖

Viktor

💻 📖 ⚠️ 🤔

Ivan Savichev

💻 🤔

Nikita Nafranets

📖 💡

Tauyekel Kunzhol

📖

Andrew Laiff

📖

Illia Osmanov

💻 🤔

Yan

📖

Egor Aristov

📖

Sozonov

📖

Rafael Fakhreev

💻 🤔 ⚠️

Victor

💻 🤔 📖

Dmitrij Shuleshov

📖

Valeriy Kobzar

💻 🚇 🤔

Ivan

💻 ⚠️

Aleksandr Osipov

📖 ⚠️

popuguy

📖 🚇 🤔

uulaal

💻

Viktor Pasynok

🚇 💻 ⚠️

Tested with browserstack

Keywords

FAQs

Last updated on 31 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc