Edux is Redux without (R)epetition
Edux is DRY version of Redux. Edux allows to manage state of Javascript appications writing less code and still have full compatibility with Redux ecosystem, i.e. use Redux DevTools in browser.
You don't need to add constants and share them between actions and reducers. You even don't need to write actions and reducer — Edux generates them from changes
files.
Edux and Redux works well together. Redux state is single source of truth on data level. Edux changes are single source of truth on logic level.
Edux processes actions with O(1) speed instead of Redux's O(N) where N is number of reducers.
Bellow is an example of using Edux's changes for creating standard Redux store:
// changes.js const DEFAULT_STATE = { return ...state id: text} { return } // index.js const addTodo addTodoAsync = const futureDispatch = storeconst futureGetState = storeconst reducer = const store =
Full example of Edux and Redux integration you can see in examples/async folder. This example is ported from the official Redux's example, so you can compare both implementations.
Examples
Installation
To install the stable version:
npm install --save edux
The Redux source code is written in ES2015 but we precompile both CommonJS and UMD builds to ES5 so they work in any modern browser.
You can use Edux together with React, or with any other view library.
It is tiny (1kB, including dependencies).
License
MIT