# damda

> State/actions container for Javascript client apps

Latest version **0.0.5** (published 2015-12-14) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2015-12-14 |
| First published | 2015-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | daesan |
| Keywords | damda, state, redux, flux |

## Links

- npm: https://www.npmjs.com/package/damda
- Repository: https://github.com/daesan/damda
- Issues: https://github.com/daesan/damda/issues
- npm.io page: https://npm.io/package/damda

## Alternatives

- [@reckona/mreact-store](https://npm.io/package/@reckona/mreact-store.md) — 976 weekly downloads
- [regular-state](https://npm.io/package/regular-state.md) — 410 weekly downloads
- [@pacote/flux-actions](https://npm.io/package/@pacote/flux-actions.md) — 65 weekly downloads
- [@pilotlab/lux-debug](https://npm.io/package/@pilotlab/lux-debug.md) — 39 weekly downloads
- [vue-persist-state](https://npm.io/package/vue-persist-state.md) — 19 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2015-12-14
- 0.0.4 — 2015-12-14
- 0.0.3 — 2015-12-14
- 0.0.2 — 2015-12-14
- 0.0.1 — 2015-12-14

## README

# Damda

Damda is a state/actions container for Javascript client apps.

It simplifies react and react native app development by separating data management from view rendering codes.

Damda was inspired by Redux. While the core ideas of Redux are inherited, Damda differs from Redux in that actions and reducer functions are not separate entities. In Damda, actions are state change functions that can be dispatched directly.


```js
const { createStore, createActionGroup } = require('damda')

/**
 * This is action group definition.
 * Each action is a pure function with (state) => state signature.
 * 
 * The shape of the state can be a nested javascript object.
 */
const counter = createActionGroup({
  default: () => 0,
  increment: (state) => state+1,
  decrement: (state) => state-1
})

let store = createStore(counter)

// You can subscribe to state changes.
store.subscribe((state) => console.log(state))

// You can change internal state by dispatching actions.
store.dispatch(counter.increment)
// 1
store.dispatch(counter.increment)
// 2
store.dispatch(counter.decrement)
// 1
```

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