Home > Software design >  React Persist State to LocalStorage with useEffect
React Persist State to LocalStorage with useEffect

Time:03-18

I persisted state to localStorage in my React app, using the useEffect hook, so that the states do not change upon refresh. Is this still going work upon deployment to heroku, or will this work only on my pc?

CodePudding user response:

Yes.

Local Storage is storage that the browser manages (for all users), not just storage locally for you.

  • Related