use-selected-items-hook
v3.1.13
Published
<p align="center"> <img src="https://raw.githubusercontent.com/LauraBeatris/use-selected-items-hook/master/.github/docs/logo.png" width="400"/> </p>
Downloads
5
Readme
:pushpin: Table of Contents
:construction_worker: Installation
With Yarn
yarn add use-selected-items-hook
With NPM
npm install use-selected-items-hook
:pushpin: Go to example
:computer: API
Initialization
To initialize the items
array, the initialItems
must be passed as an argument. It's also possible to initialize the items already with an isSelected
state, but to do so, it's necessary to provide the initialSelectedItems
argument.
Return Values
selectedItems
: The items that are currently selected.listItems
: The items with the status ofisSelected
. Refer to the Usage.
Actions
toggleSingleItem
toggleAllItems
:hammer: Builds
es
(EcmaScript module)cjs
(CommonJS)
:postbox: Faq
Question: What are the technologies used in this project?
Answer: The technologies and libraries used in this project are React + TypeScript and Immutability Helper to handle the array manipulation.
:bug: Issues
Feel free to file a new issue with a respective title and description on the the useSelectItems hook repository. If you already found a solution to your problem, I would love to review your pull request! Have a look at our contribution guidelines to find out about the coding standards.
:tada: Contributing
Check out the contributing page to see the best places to file issues, start discussions and begin contributing.
:closed_book: License
Released in 2020
This project is under the MIT license.
Made with love by Laura Beatris 💜🚀