React usePersistedState hook
Returns a stateful value, persisted in localStorage, and a function to update it.
Use the useState() hook to initialize the value to defaultValue .
Use the useRef() hook to create a ref that will hold the name of the value in Window.localStorage.
U...
walidcherhane.hashnode.dev2 min read