diff --git a/README.md b/README.md index 7701c6c..4739381 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,18 @@ Methods: - `add` - `clear` - `removeIndex` -- `removeById` +- `removeById` - if array consists of objects with some specific `id` that you pass +all of them will be removed +- `move` - moves item from position to position shifting other elements. +``` + So if input is [1, 2, 3, 4, 5] + + from | to | expected + 3 | 0 | [4, 1, 2, 3, 5] + -1 | 0 | [5, 1, 2, 3, 4] + 1 | -2 | [1, 3, 4, 2, 5] + -3 | -4 | [1, 3, 2, 4, 5] +``` ## useSetState