docs: add useUpsert to readme

This commit is contained in:
Ward Oosterlijnck 2019-10-07 20:50:19 +11:00
parent 4f48494126
commit 03ccfa9845
3 changed files with 11 additions and 2 deletions

View File

@ -131,7 +131,7 @@
- [`useStateList`](./docs/useStateList.md) — circularly iterates over an array. [![][img-demo]](https://codesandbox.io/s/bold-dewdney-pjzkd)
- [`useToggle` and `useBoolean`](./docs/useToggle.md) — tracks state of a boolean. [![][img-demo]](https://codesandbox.io/s/focused-sammet-brw2d)
- [`useCounter` and `useNumber`](./docs/useCounter.md) — tracks state of a number. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/state-usecounter--demo)
- [`useList`](./docs/useList.md) — tracks state of an array. [![][img-demo]](https://codesandbox.io/s/wonderful-mahavira-1sm0w)
- [`useList`](./docs/useList.md) and [`useUpsert`](./docs/useUpsert.md) — tracks state of an array. [![][img-demo]](https://codesandbox.io/s/wonderful-mahavira-1sm0w)
- [`useMap`](./docs/useMap.md) — tracks state of an object. [![][img-demo]](https://codesandbox.io/s/quirky-dewdney-gi161)

View File

@ -25,3 +25,7 @@ const Demo = () => {
);
};
```
## Related hooks
- [useUpsert](./useUpsert.md)

View File

@ -1,6 +1,7 @@
# `useUpsert`
Superset of `useList`. Provides an additional method to upsert (update or insert) an element into the list.
Superset of [`useList`](./useList.md). Provides an additional method to upsert (update or insert) an element into the list.
## Usage
```jsx
@ -26,3 +27,7 @@ const Demo = () => {
);
};
```
## Related hooks
- [useList](./useList.md)