# deltax

> Helper methods and cli to remove the boilerplate of Redux project setup and development.

Latest version **0.0.0-alpha.7** (published 2018-08-01) · ISC license · 0 weekly downloads

## Install

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

Provides the command `deltax`.

## 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.0-alpha.7 |
| Published | 2018-08-01 |
| First published | 2018-07-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ryan P. Hansen |
| Maintainers | rphansen91 |
| Keywords | redux, middleware |

## Links

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

## Dependencies (2)

- [ncp](https://npm.io/package/ncp.md) ^2.0.0
- [commander](https://npm.io/package/commander.md) ^2.16.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.0-alpha.7 (latest) — 2018-08-01
- 0.0.0-alpha.6 — 2018-07-31
- 0.0.0-alpha.5 — 2018-07-31
- 0.0.0-alpha.4 — 2018-07-31
- 0.0.0-alpha.3 — 2018-07-31
- 0.0.0-alpha.2 — 2018-07-31
- 0.0.0-alpha.1 — 2018-07-31

## README

# DeltaX

## Description

Helper methods and cli to remove the boilerplate of Redux project setup and development.

## Setup

1. `npm install deltax --save`
2. `cd <src directory>`
3. `deltax create`

## Usage

1. Create Actions

```js
// ./store/actions/counter.js
import { createAction as ca } from "deltax"

export const inc = ca("INCREMENT")
export const dec = ca("DECREMENT")
```

2. Create Reducer

  `deltax reducer counter`

```js
// ./store/reducers/counter.js
import { createReducer as cr } from "deltax"
import { inc, dec } from "../actions/counter"

export default cr({ count: 0 }, [
  inc.case(({ count }, v = 1) => ({ count: count + v })),
  dec.case(({ count }, v = 1) => ({ count: count - v }))
])

```

3. Dispatch Actions

```js
// ./components/counter.js
import { connect } from "react-redux"
import { inc, dec } from "../store/actions/counter"

export default connect(
  ({ counter }) => ({ counter }),
  dispatch => ({
    inc () {
      dispatch(inc())
    },
    dec () {
      dispatch(dec())
    }
  })
)
```

## [Example](/example.js)

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