# redux-crud

> Redux CRUD

Latest version **3.3.0** (published 2018-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-crud
pnpm add redux-crud
yarn add redux-crud
bun add redux-crud
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.3.0 |
| Published | 2018-06-04 |
| First published | 2015-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 212.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 616 |
| Author | Versent |
| Maintainers | sporto |
| Keywords | redux, crud |

## Links

- npm: https://www.npmjs.com/package/redux-crud
- Repository: https://github.com/Versent/redux-crud
- Issues: https://github.com/Versent/redux-crud/issues
- npm.io page: https://npm.io/package/redux-crud

## Dependencies (3)

- [ramda](https://npm.io/package/ramda.md) ^0.24.1
- [invariant](https://npm.io/package/invariant.md) ^2.1.0
- [action-names](https://npm.io/package/action-names.md) ^0.4.0

## Recent versions

- 3.3.0 (latest) — 2018-06-04
- 3.2.0 — 2017-06-30
- 3.1.0 — 2017-05-26
- 3.0.5 — 2017-04-11
- 3.0.4 — 2017-02-11
- 3.0.3 — 2017-02-05
- 3.0.2 — 2017-02-02
- 3.0.1 — 2017-01-27
- 3.0.0 — 2017-01-27
- 2.0.0 — 2016-12-04
- 1.0.1 — 2016-10-03
- 1.0.0 — 2016-02-24
- 0.10.1 — 2015-12-14
- 0.10.0 — 2015-12-11
- 0.9.1 — 2015-11-07
- … 14 more at https://npm.io/package/redux-crud/versions

## README

# Redux CRUD

[ ![Codeship Status for Versent/redux-crud](https://codeship.com/projects/41be3440-293a-0133-d1a0-76c73dc375da/status?branch=master)](https://codeship.com/projects/97928)

Redux CRUD is a convention driven way of building CRUD applications using Redux. After building several Flux applications we found that we always end up creating the same action types, actions and reducers for all our resources.

Redux CRUD gives you a standard set of:

- action types: e.g. `USER_UPDATE_SUCCESS`
- actions: e.g. `updateSuccess`, `updateError`
- reducers: for the action types above e.g. `updateSuccess`

# Working with resources in Redux

When building an app you might have resources like __`users`__, __`posts`__ and __`comments`__.

You'll probably end up with action types for them like:

- `USERS_FETCH_SUCCESS`
- `POSTS_FETCH_SUCCESS`
- `COMMENTS_FETCH_SUCCESS`

And action creators like:

- `users.fetchSuccess`
- `posts.fetchSuccess`
- `comments.fetchSuccess`

There's obvious repetition there. Redux CRUD aims to remove this boilerplate by providing strong conventions on naming and processing data.

## Stores

Redux-crud provides two stores:

- __List__. A plain JS array. This preserves the order of records.
- __Map__. A JS object where records are indexed by key. This provides faster writes and lookups.

## Docs

### [Actions](./docs/actions.md)
### [Reducers](./docs/reducers.md)
### [Using with Redux](./docs/redux.md)
### [Tips](./docs/tips.md)

## Testing

```
npm test
```

## Example

You can see [a basic example here](./example)

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