Skip to content

Commit

Permalink
- Documentation for move function added
Browse files Browse the repository at this point in the history
  • Loading branch information
RIP21 committed Apr 8, 2019
1 parent a3b1534 commit 5144415
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5144415

Please sign in to comment.