# use-deep-update-callback

> A callback that will immutably update an object accoring to a given path.

Latest version **1.2.0** (published 2019-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-deep-update-callback
pnpm add use-deep-update-callback
yarn add use-deep-update-callback
bun add use-deep-update-callback
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2019-11-05 |
| First published | 2019-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 34.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | korbinancell |
| Maintainers | korbinancell |

## Links

- npm: https://www.npmjs.com/package/use-deep-update-callback
- Repository: https://github.com/korbinancell/use-deep-update-callback
- npm.io page: https://npm.io/package/use-deep-update-callback

## Recent versions

- 1.2.0 (latest) — 2019-11-05
- 1.1.0 — 2019-10-31
- 1.0.0 — 2019-10-16

## README

# use-deep-update-callback

> A callback that will immutably update an object according to a given path.

[![NPM](https://img.shields.io/npm/v/use-deep-update-callback.svg)](https://www.npmjs.com/package/use-deep-update-callback) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
yarn add use-deep-update-callback
```

## Usage

```tsx
import React, { useState } from 'react'
import { useDeepUpdateCallback } from 'use-deep-update-callback'

const Example = () => {
  const [state, setState] = useState({ inputValues: { nameInput: { value: '' } } });
  const onChange = useDeepUpdateCallback(state, ['inputValues', 'nameInput', 'value'], setState);

  return (
    <div>
      <input value={state} onChange={event => onChange(event.target.value)} />
    </div>
  )
}
```

## License

MIT © [korbinancell](https://github.com/korbinancell)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).

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