useLocalStorage
useLocalStorage
is a custom hook to help handle storing data in Local Storage.
import { useLocalStorage } from 'minerva-ui';
The useLocalStorage
hook returns an object with the following fields:
Name | Type | Default | Description |
---|---|---|---|
isOpen | boolean | false | If true, it sets the component to it's visible state. |
onClose | function | Function that sets isOpen to false. | |
onOpen | function | Function that sets isOpen to true. | |
onToggle | function | Function that toggles isOpen between true and false. |
Usage
You've clicked the button 0 times.