_useLocalStorage is a plain dependency-free JavaScript utility or React hook for working with browser local storage. It can be used in both vanilla JS projects and React applications without the need for react useEffect or page rehydration. It provides features like caching and resetting states, separate states in local storage, and encryption of data by default. It can be used in SSR or server component React with the use of hacks like 'use client' and 'typeof window'. Quick notes for nerds include using .env variable secrets for increased security and the encryption used being basic.
Table of contents
π₯ FeaturesβΆοΈ Installationπ Now, How It Works With An Example:βοΈ Quick Notes For Nerds:π οΈ Development And Contributionπ Credits1 Comment
Sort: