An open API service indexing awesome lists of open source software.

https://github.com/streamich/three-ducks

Distilled Redux for gourmet developers
https://github.com/streamich/three-ducks

Last synced: 11 months ago
JSON representation

Distilled Redux for gourmet developers

Awesome Lists containing this project

README

          

# three-ducks

[![][npm-badge]][npm-url] [![][travis-badge]][travis-url]

Tiny Redux clone with plugins.

- __Tiny__ — core is only [5 lines of code](./src/index.js), [`redux` preset](./docs/presets/redux.md) is 0.6Kb
- __All Redux APIs__ — `.subscribe()`, `.getState()`, `.dispatch()`, etc. — as separate plugins
- __Faster than Redux__ — see [benchmark results](#benchmark)
- __100% compatible__ — works with [`react-redux`](https://github.com/reactjs/react-redux), passes [Redux `createStore()` test suite](./src/presets/__tests__/reduxSpec.test.js)
- __Public domain__ — [Unlicense license](./LICENSE)

## Reference

- [Installation](./docs/Installation.md)
- [Plugins](./docs/Plugins.md)
- [`dispatch`](./docs/plugins/dispatch.md)
- [`reducer`](./docs/plugins/reducer.md)
- [`subscribe`](./docs/plugins/subscribe.md)
- [`replaceReducer`](./docs/plugins/replaceReducer.md)
- [`getState`](./docs/plugins/getState.md)
- [`observable`](./docs/plugins/observable.md)
- [`thunk`](./docs/plugins/thunk.md)
- [Presets](./docs/Presets.md)
- [`redux`](/docs/presets/redux.md)

## See also

- [`nano-css`](https://github.com/streamich/nano-css) — Distilled CSS-in-JS for gourmet developers

## Benchmark

Running a simple ["counter" micro-benchmark](./benchmark/index.js).

```
three-ducks (with redux preset) x 1,076 ops/sec ±2.58% (47 runs sampled)
redux x 494 ops/sec ±4.40% (43 runs sampled)
Fastest is three-ducks (with redux preset)
```

[npm-url]: https://www.npmjs.com/package/three-ducks
[npm-badge]: https://img.shields.io/npm/v/three-ducks.svg
[travis-url]: https://travis-ci.org/streamich/three-ducks
[travis-badge]: https://travis-ci.org/streamich/three-ducks.svg?branch=master