skip to Main Content

So I am a new full stack developer, and making a job portal through some course. He saved the dark theme state value of website in local storage.

Is it a good practice? Like there might be other cookies in very large scale websites and pushing everything to local storage wont affect website loading and performance?

2

Answers


  1. A key-value pair like "theme": "dark" is not going to affect the performance in any noticeable way. No need to worry about it.

    Login or Signup to reply.
  2. Its a very small chunk of data to store it there, it won’t affect the performance in any manner. Also, if you see packages like redux-persist, these are also using localstorage underneath the hood so I think its pretty much justified to utilise to store it there

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search