useCookie
Read and write one browser cookie as React state. Components that use the same cookie name stay in sync.
- Level
- Intermediate
- Since
- v1.0.0
import {useCookie} from '@zenuilabs/react-hooks';Loading demo_
More in Utilities
UtilitiesBasicuseCopyToClipboardCopy text to the clipboard and get a short-lived flag for "Copied" feedback. Falls back to a hidden textarea on plain http pages and older browsers.UtilitiesIntermediateuseDeepCompareEffectWorks like useEffect but compares dependencies by value. Use it when a dependency is an object or array that is rebuilt on every render.UtilitiesBasicuseDocumentTitleSets document.title while the component is mounted and restores the previous title when it unmounts. Use it for page titles and unread counts.