Select values from a list easily. List selection hook for react.
Argument | Type | Description | Default value |
---|---|---|---|
list | Array | List of items for which the selection is used | undefined |
initialIndex | number | Initially selected index | 0 |
Returned object attributes | Type | Description |
---|---|---|
index | int | Index of currently selected index |
item | any | Currently selected item |
setIndex | function | Update selected index |
setItem | function | Update selected item |
Join our discord server! You can click the floating discord icon at the bottom right of the screen and chat with us!