# nanodux

> A tiny implementation of a redux like api.

Latest version **1.1.0** (published 2017-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install nanodux
pnpm add nanodux
yarn add nanodux
bun add nanodux
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-09-22 |
| First published | 2017-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | twilson63 |

## Links

- npm: https://www.npmjs.com/package/nanodux
- Repository: https://github.com/twilson63/nanodux
- Homepage: https://github.com/twilson63/nanodux#readme
- Issues: https://github.com/twilson63/nanodux/issues
- npm.io page: https://npm.io/package/nanodux

## Dependencies (1)

- [nanofp](https://npm.io/package/nanofp.md) ^1.3.0

## Recent versions

- 1.1.0 (latest) — 2017-09-22
- 1.0.3 — 2017-09-21
- 1.0.2 — 2017-09-21
- 1.0.0 — 2017-09-21

## README

# nanodux

A tiny implementation of a redux like api.

This light version of redux comes with thunk built-in to dispatch, there is not concept of middleware, it simply provides a createStore method that creates an object which has the `dispatch`, `subscribe`, and `getState` methods.

You also have the helper combineReducers to make it easy to build out a global state tree.

## Install

`yarn add nanodux`

## Usage

``` js
import { createStore, combineReducers } from 'nanodux'

const store = createStore(
  combineReducers({
    counter: (state=0, action) => {
      switch (action.type) {
        case 'INCR':
          return state + action.payload
        default:
          return state
      }
    }
  })
)

store.subscribe((state, prevState) => {
  console.log('state changed')
})

store.dispatch({type: 'INCR', payload: 1})
```

## Test

`yarn test`

## License

MIT

## Thank you

* Redux Community

---

DISCLAIMER: this module is only recommended for prototyping and learning, it is not battle tested for production systems, use Redux for that!

---
_Source: https://npm.io/package/nanodux · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
