# redux-rewire-live

> ## Basic Use ```javascript const {createStore} = require('./redux'); const {rewire} = require('redux-rewire-live')

Latest version **1.1.0** (published 2018-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-rewire-live
pnpm add redux-rewire-live
yarn add redux-rewire-live
bun add redux-rewire-live
```

## 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 | 2018-12-05 |
| First published | 2018-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | carsonnwright |

## Links

- npm: https://www.npmjs.com/package/redux-rewire-live
- npm.io page: https://npm.io/package/redux-rewire-live

## Recent versions

- 1.1.0 (latest) — 2018-12-05
- 1.0.0 — 2018-09-29

## README

# redux-rewire-live

## Basic Use
```javascript
const {createStore} = require('./redux');
const {rewire} = require('redux-rewire-live')

const reducer = (state, action)=>({
  currentUserID: 0,
  users: [
    {
      firstName: 'John',
      lastName: 'Doe'
    },
    {
      firstName: 'Jane'
      lastName: 'Doe'
    } 
  ]
})

const store = createStore(reducer)


const currentUser = (state)=>({
  ...state
  currentUser: {
    ...state.users[state.currentUserID]
  }
})

const rewiredStore = rewire(store, currentUser)

rewiredStore.getState().currentUser
// {firstName: 'John', lastName: 'Doe'}
```

## Testing
```
yarn test
```

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