# redux-static

> Static initialization for Redux.

Latest version **1.1.0** (published 2017-04-20) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.1.0 |
| Published | 2017-04-20 |
| First published | 2016-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sandrino Di Mattia |
| Maintainers | sandrinodimattia |
| Keywords | redux |

## Links

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

## Recent versions

- 1.1.0 (latest) — 2017-04-20
- 1.0.0 — 2016-06-21

## README

# Redux Static

Static initialization for Redux. This allows you to define your actions and state in the same static way that you define `propTypes` and `defaultProps`.

Example:

```js
import { connectContainer } from 'redux-static';
import React, { Component, PropTypes } from 'react';

import { invoiceActions } from '../actions';

export default connectContainer(class extends Component {
  static stateToProps = (state) => ({
    invoices: state.invoices
  });

  static actionsToProps = {
    ...invoiceActions
  }

  static propTypes = {
    invoices: PropTypes.object,
    fetchInvoices: PropTypes.func.required
  }

  componentWillMount() {
    this.props.fetchInvoices();
  }

  render() {
    return <InvoicesTable invoices={invoices} />;
  }
});
```

## License

MIT

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