@neogeek/common-react-hooks
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

@neogeek/common-react-hooks

Tests NPM Version

Install

$ npm install @neogeek/common-react-hooks

Documentation

useDisabledFocus(ref, disabled)

const ExampleFunction = () => {
  const [disabled, setDisabled] = useState(false);

  const ref = useRef<HTMLButtonElement>(null);

  useDisabledFocus(ref, disabled);

  return (
    <button ref={ref} onClick={() => setDisabled(true)}>
      Save
    </button>
  );
};

useFlash(trigger, [timeoutInMilliseconds = 1000])

const isFlashVisible = useFlash(false);

Readme

Keywords

none

Package Sidebar

Install

npm i @neogeek/common-react-hooks

Weekly Downloads

4

Version

3.2.0

License

none

Unpacked Size

23.3 kB

Total Files

13

Last publish

Collaborators

  • neogeek