# lux-state

> State management.

Latest version **1.1.0** (published 2017-06-06) · 0 weekly downloads

## Install

```sh
npm install lux-state
pnpm add lux-state
yarn add lux-state
bun add lux-state
```

## 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-06-06 |
| First published | 2017-06-06 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | adamki |

## Links

- npm: https://www.npmjs.com/package/lux-state
- npm.io page: https://npm.io/package/lux-state

## Dependencies (3)

- [flow](https://npm.io/package/flow.md) ^0.2.3
- [react](https://npm.io/package/react.md) ^15.5.4
- [react-dom](https://npm.io/package/react-dom.md) ^15.5.4

## Recent versions

- 1.1.0 (latest) — 2017-06-06
- 0.1.0 — 2017-06-06

## README

State management.

```
In your HOC:

import {connector} from 'lux-state'

mapStateToProps = state = ({
  someValue: state.someValue,
  anotherValue: state.anotherValue,
})

mapDispatchToProps = dispatch => ({
  someAction: () => dispatch(actionFunc())
})

export default connect(
  mapStateToProps,
  mapDispatchToProps,
)(YourHOC)

```

```
in your `src/index`:

import { createStore } from './lib/store';
// can also import middleware here

const store = createStore(reducer, applyMiddleware(
  loggingMiddleware,
  thunkMiddleware,
));

ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('root'),
);
```

heavily influenced by Zapier [engineering](https://zapier.com/engineering/how-to-build-redux/)

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