# redux-sands

> Wrapper for redux to handle all boiler-plate, as DRY as the desert.

Latest version **1.0.4** (published 2018-07-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-07-06 |
| First published | 2018-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 343.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Schönmann |
| Maintainers | captain-quark |
| Keywords | react, redux, saga, boilerplate, remove, react-native, web, state |

## Links

- npm: https://www.npmjs.com/package/redux-sands
- Repository: https://github.com/CaptainQuark/redux-sands
- Homepage: https://neue-moderne.gitbook.io/redux-sands/
- Issues: https://github.com/CaptainQuark/redux-sands/issues
- npm.io page: https://npm.io/package/redux-sands

## Dependencies (7)

- [react](https://npm.io/package/react.md) ^16.4.1
- [redux](https://npm.io/package/redux.md) ^4.0.0
- [redux-saga](https://npm.io/package/redux-saga.md) ^0.16.0
- [react-redux](https://npm.io/package/react-redux.md) ^5.0.7
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [babel-preset-minify](https://npm.io/package/babel-preset-minify.md) ^0.5.0-alpha.a24dd066
- [babel-plugin-transform-export-default](https://npm.io/package/babel-plugin-transform-export-default.md) ^7.0.0-alpha.20

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2018-07-06
- 1.0.0-beta.3 (beta) — 2018-06-26
- 1.0.3 — 2018-07-06
- 1.0.2 — 2018-07-05
- 1.0.1 — 2018-07-05
- 1.0.0 — 2018-07-05
- 1.0.0-beta.9 — 2018-07-04
- 1.0.0-beta.8 — 2018-07-04
- 1.0.0-beta.7 — 2018-07-03
- 1.0.0-beta.6 — 2018-07-02
- 1.0.0-beta.5 — 2018-07-01
- 1.0.0-beta.4 — 2018-07-01
- 1.0.0-beta.2 — 2018-06-30
- 1.0.0-beta.1 — 2018-06-29
- 1.0.0-rc2 — 2018-06-25
- … 1 more at https://npm.io/package/redux-sands/versions

## README

<p align="center">
  <img src="https://raw.githubusercontent.com/CaptainQuark/redux-sands/master/assets/rs_hero_alt/rs_hero_alt.007.png" width="100%"/>
</p>

<br/><br/><br/>

<p align="center">
Redux-wrapper for React-components. As DRY as the desert: takes care of managing all boilerplate-code and lets you focus on the state-reducing functions. Supports saga-integration. Furthermore makes importing of actions/state-props from other Redux-components as simple as possible.
</p>

<br/><br/></br>

<p align="center">

<a href="https://www.npmjs.com/package/redux-sands">
  <img src="https://img.shields.io/npm/v/redux-sands.svg">
</a>

  <a href="https://www.npmjs.com/package/redux-sands">
  <img src="https://img.shields.io/bundlephobia/min/redux-sands.svg">
</a>

<a href="https://www.npmjs.com/package/redux-sands">
  <img src="https://img.shields.io/npm/dm/redux-sands.svg">
</a>

<a href="https://www.npmjs.com/package/redux-sands">
  <img src="https://img.shields.io/travis/CaptainQuark/redux-sands.svg">
</a>

<a href="https://www.npmjs.com/package/redux-sands">
  <img src="https://github.com/CaptainQuark/redux-sands/blob/master/coverage/badge-statements.svg">
</a>

  <a href="https://github.com/CaptainQuark/redux-sands/blob/master/LICENSE">
  <img src="https://img.shields.io/npm/l/redux-sands.svg" >
</a>

<a href="https://github.com/CaptainQuark/redux-sands/blob/master/LICENSE">
  <img src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" >
</a>

</p>

<br/><br/></br>

## Quick Intro

`redux-sands` gives you a single class as default export, from now on called `ReduxWrapper`. Here's a simple example that demonstrates how you could use it:

```js
import ReduxWrapper from "redux-sands";
import component from "./component";

// Instantiate the wrapper.
const wrapper = new ReduxWrapper({ called: "example" });

// Simply add the initial state, the component for render + a reducer.
wrapper
  .add({ initState: { count: 0 } })
  .add({ component })
  .add({ update: (state, action) => ({ ...state, ...action }) });

// Expose the redux-wrapper as any other redux-component.
export default wrapper.connection;
export const reducer = wrapper.reducer;
```

And now let's call it:

```jsx
class Comp extends PureComponent {
  render() {
    // When using 'ReduxWrapper', only an object as param is allowed.
    // Provide your values then via that object.
    return (
      <div onClick={() => this.props.update({ count: this.props.count + 1 })}>
        Increment
      </div>
    );
  }
}
```

As far as basic use cases go, that's it! No more hassle with manually creating actions, mappings and endless switches. Action-types get inferred automatically, as well as the linking to the reducer. You can focus on the actual app logic without having to deal with refactoring etc.

<br/>

<p align="center">
  <a href="https://neue-moderne.gitbook.io/redux-sands/">
  <img src="https://raw.githubusercontent.com/CaptainQuark/redux-sands/master/assets/gitbook-banner.png" width="100%"/>
  </a>
</p>

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