DEV Community

Cover image for Question,Help, React local Storage
Melbite blogging Platform
Melbite blogging Platform

Posted on

Question,Help, React local Storage

Hello dev community,

How do you create a react and local-storage session that accepts multiple inputs, stores them, retrieves the data when needed, functionality to edit a field and update the field.

In brief how do you create a CRUD operation with react and local storage?

Key functionality => Use multiple input field and perform CRUD

Give references if any available.
Thanks,

Top comments (4)

Collapse
 
highasthedn profile image
highasthedn

I don't know if I get you right, first what do you mean with "session"? Be aware that you have the choice between localStorage and sessionStorage. Or do you mean some kind of a user session? CRUD sounds like that you want to use it as a kind of database.
LocalStorage is just a key value store which has not much capacities (I think 5MB) and accepts strings, so whatever you want to store above strings has to be serialized

Collapse
 
evansifyke profile image
Melbite blogging Platform

I mean to use localStorage as a database.

Collapse
 
highasthedn profile image
highasthedn

Ok why don't you use IndexedDB? That should cover your requirements more than localStorage does

Thread Thread
 
evansifyke profile image
Melbite blogging Platform

Okay, Let me do that.
Thanks for your help.