@neogeek/common-react-hooks
v3.2.0
Published
Common React hooks.
Downloads
3
Readme
@neogeek/common-react-hooks
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);