DEV Community

Discussion on: What is localStorage?

Collapse
 
raddevus profile image
raddevus

Even if you're saving only one or two name value pair?

localStorage is extremely easy to use and is secure.

Now, you may want to say something like:
"Cookies should not be used anymore in production apps, there is localStorage."

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

Even then yes, LocalStorage is blocking the main thread, for this I recommend idb-keyval which lets you store small things like you mentioned in indexeddb also watch this video please to learn more youtu.be/NNuTV-gjlZQ