# react-redux-decorate

> decorators for react-redux

Latest version **0.0.5** (published 2018-05-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-redux-decorate
pnpm add react-redux-decorate
yarn add react-redux-decorate
bun add react-redux-decorate
```

## 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 | 2018-05-30 |
| First published | 2017-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Alexei Bazhenov |
| Maintainers | abazhenov |

## Links

- npm: https://www.npmjs.com/package/react-redux-decorate
- Repository: https://github.com/Abazhenov/react-redux-decorate
- Homepage: https://github.com/Abazhenov/react-redux-decorate#readme
- Issues: https://github.com/Abazhenov/react-redux-decorate/issues
- npm.io page: https://npm.io/package/react-redux-decorate

## Dependencies (1)

- [react-redux](https://npm.io/package/react-redux.md) ^5.0.6

## Recent versions

- 0.0.5 (latest) — 2018-05-30
- 0.0.4 — 2018-01-07
- 0.0.3 — 2018-01-07
- 0.0.2 — 2018-01-05
- 0.0.1 — 2017-12-28

## README

A Collection of decorators to make using `connect` easier.

## Installation
`npm install react-redux-decorate`

## Example
```js
import React from 'react'
import { mapDispatchToProps, mapStateToProps } from 'react-redux-decorate'

@mapStateToProps((state) => ({
  users: state.users
}))
@mapDispatchToProps((dispatch, ownProps) => ({
  getUser(id) {
    dispatch(ownProps.getUser(id))
  }
}))
export default class MyFancyComponent extends React.Component {
 // react things in here
}
```

## Usage
`mapStateToProps(mapStateToProps (Function), [options] (Object))`

`mapDispatchToProps(mapDispatchToProps(Function), [options] (Object))`

`fn` and `options` follow the [react-redux-api for connect](https://github.com/reactjs/react-redux/blob/master/docs/api.md#api)

react-redux's `connect` is also in case of complicated use-cases

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