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
A key-value pair like "theme": "dark" is not going to affect the performance in any noticeable way. No need to worry about it.
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