use-select-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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>
  );
};

Readme

Keywords

Package Sidebar

Install

npm i use-select-react

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

1.25 kB

Total Files

2

Last publish

Collaborators

  • majiddarvish