# feathers-action-react

> connect feathers-action to react data containers

Latest version **2.3.0** (published 2017-12-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install feathers-action-react
pnpm add feathers-action-react
yarn add feathers-action-react
bun add feathers-action-react
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2017-12-20 |
| First published | 2017-05-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mikey |
| Maintainers | ahdinosaur, notthatsmith, sarah-arrrgh, agentlewis, iainkirkpatrick, gregorykan |

## Links

- npm: https://www.npmjs.com/package/feathers-action-react
- Repository: https://github.com/ahdinosaur/feathers-action-react
- Homepage: https://github.com/ahdinosaur/feathers-action-react#readme
- Issues: https://github.com/ahdinosaur/feathers-action-react/issues
- npm.io page: https://npm.io/package/feathers-action-react

## Dependencies (7)

- [ramda](https://npm.io/package/ramda.md) ^0.23.0
- [react](https://npm.io/package/react.md) ^15.5.4
- [redux](https://npm.io/package/redux.md) ^3.6.0
- [es2040](https://npm.io/package/es2040.md) ^1.2.6
- [recompose](https://npm.io/package/recompose.md) ^0.24.0
- [react-redux](https://npm.io/package/react-redux.md) ^5.0.4
- [incremental-id](https://npm.io/package/incremental-id.md) ^1.0.0

## Recent versions

- 2.3.0 (latest) — 2017-12-20
- 3.0.0-pre.4 (prerelease) — 2018-02-15
- 3.0.0-pre.3 — 2018-02-15
- 3.0.0-pre.2 — 2018-02-15
- 3.0.0-pre.1 — 2018-02-12
- 3.0.0-pre.0 — 2018-02-08
- 2.2.2 — 2017-11-18
- 2.2.1 — 2017-08-07
- 2.2.0 — 2017-08-07
- 2.1.0 — 2017-07-27
- 2.0.1 — 2017-07-26
- 1.0.0 — 2017-05-08

## README

# feathers-action-react

connect [feathers-action@2](https://github.com/ahdinosaur/feathers-action) to react data containers

made as part of [dogstack](https://dogstack.js.org) :dog: :dog: :dog:

```shell
npm install --save feathers-action-react
```

## example

```js
import { connect } from 'feathers-action-react'

import Dogs from '../components/dogs'

import { actions as dogActions } from '../'

import { getIndexProps } from '../getters'

export default connect({
  selector: getIndexProps,
  actions: { dogs: dogActions },
  query: {
    service: 'dogs',
    params: {}
  }
})(Dogs)
```

## usage

### `{ connect } = require('feathers-action-react')`

### `hoc = connect(options)`

`options`:

- `selector`: a function of shape `(state) => props`
- `actions`: an object where keys are feathers service names and values are objects of action creators
- `query`: an object to describe a feathers `find` or `get` service method call, or an array of these, or a function of shape `(props) => query`.
  - for find: `{ service, params }`
  - for get: `{ service, id, params }`
- `shouldQueryAgain`: a function of shape `(props, status, prevProps, prevStatus) => Boolean` for whether we should re-fetch on updated props

`hoc` is a "higher-order component": a function of shape `(component) => nextComponent`

## license

The Apache License

Copyright &copy; 2017 Michael Williams

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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