1.0.1 • Published 2 years ago

use-select-react v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

useSelect

npm link

How to install

With npm:
npm install --save use-select-react
With yarn:
yarn add use-select-react

How to use:

import { useSelect } from 'use-select-react';
const Example = () => {
  const [selectedItems, setSelect] = useSelect<SomeType>();
  return (
    <div>
      {someArray.map((item) => {
        return <span onClick={setSelect.bind(null, item)}>{item.name}</span>;
      })}
    </div>
  );
};