Skip to content

neogeek/common-react-hooks

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published