# apply-ref

> > Apply React refs

Latest version **1.0.0** (published 2020-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install apply-ref
pnpm add apply-ref
yarn add apply-ref
bun add apply-ref
```

## 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.0.0 |
| Published | 2020-11-24 |
| First published | 2018-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | mitchellhamilton |
| Keywords | react, ref, resolve |

## Links

- npm: https://www.npmjs.com/package/apply-ref
- Repository: https://github.com/mitchellhamilton/apply-ref
- Homepage: https://github.com/mitchellhamilton/apply-ref#readme
- Issues: https://github.com/mitchellhamilton/apply-ref/issues
- npm.io page: https://npm.io/package/apply-ref

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-11-24
- 0.2.3 — 2019-12-17
- 0.2.2 — 2019-10-18
- 0.2.1 — 2019-05-28
- 0.2.0 — 2019-02-19
- 0.1.1 — 2019-02-17
- 0.1.0 — 2018-12-07

## README

# apply-ref

> Apply React refs

## Install

```bash
yarn add apply-ref
```

## Usage

```jsx
import applyRef, { applyRefs } from 'apply-ref'

let ref1 = val => {/*...*/}
let ref2 = React.createRef()

<div ref={applyRefs(ref1, ref2)} />

// OR

<div ref={(val) => {
  applyRef(ref1, val)
  applyRef(ref2, val)
  someOtherHandler(val)
}} />
```

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