# immutable-component

> immutable-component to make state immutable

Latest version **2.1.1** (published 2019-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install immutable-component
pnpm add immutable-component
yarn add immutable-component
bun add immutable-component
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2019-01-22 |
| First published | 2017-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 8.10.0 |
| Dependencies | 1 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | ustccjw |
| Maintainers | ustccjw |
| Keywords | component, immutable |

## Links

- npm: https://www.npmjs.com/package/immutable-component
- Repository: https://github.com/ustccjw/immutable-component
- Homepage: https://github.com/ustccjw/immutable-component#readme
- Issues: https://github.com/ustccjw/immutable-component/issues
- npm.io page: https://npm.io/package/immutable-component

## Dependencies (1)

- [immer](https://npm.io/package/immer.md) 1.10.5

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2019-01-22
- 2.1.0 — 2018-06-20
- 2.0.6 — 2018-04-12
- 2.0.5 — 2018-03-13
- 2.0.4 — 2018-03-13
- 2.0.3 — 2018-03-13
- 2.0.2 — 2018-03-12
- 2.0.0 — 2018-03-12
- 1.0.3 — 2017-08-29
- 1.0.2 — 2017-07-24
- 1.0.1 — 2017-07-24
- 1.0.0 — 2017-07-24

## README

# immutable-component
immutable-component to make state immutable


## Usage

```javascript
this.setState({
    'a.b': 1
})
// or 
this.setState(prevState => {
    prevState.a.b = 1
})

// Either return a new value *or* modify the draft
this.setState(prevState => {
    // prevState.a.b.c = 1
    return { a: { b: 1 } }
})
```

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