1.0.5 • Published 3 years ago

react-use-array v1.0.5

Weekly downloads
13
License
MIT
Repository
github
Last release
3 years ago

NPM

react-use-array

A custom React hook that lets you manipulate an array data structure without ever needing extra utilities. Actively maintained, issues and PRs welcome. Now with full TypeScript support.

Forked from filipdanic/use-array.

👉 Demo site and docs.

Start with:

npm install --save react-use-array

Then, import and use the hook:

import useArray from 'react-use-array'
// …in your functional component:
const [ list, {
  set, empty, replace, push,
  updateAt, setAt, removeAt,
  filter, map, sort, reverse,
  mergeBefore, mergeAfter,
}] = useArray(defaultList);

Docs

The complete documentation as well as a live demo is available here.

License

MIT © HoodHub

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago