DEV Community

Discussion on: The Basics of Local Storage in React JS!

lukeshiru profile image
Luke Shiru

Then why title it "Local Storage in React" if you'll not integrate it with React? You could just show localStorage without React then. I mean I get that you get more views with the #react tag, but is like I wrote an article called "Adding numbers in React" and did this:

const OnePlusOne => () => <>{1 + 1}</>
Enter fullscreen mode Exit fullscreen mode

Instead of just doing 1 + 1 😵

Thread Thread
salehmubashar profile image
Saleh Mubashar Author • Edited on

You missed my point. I could have mentioned using localstorage with hooks in details, however most of my tutorials are targeted to the beginner or intermediate audience. Besides, i mentioned several times in my post that you can use the items from local storage in any way possible, focus was localstorage itself and how to get started with it.

Thread Thread
salehmubashar profile image
Saleh Mubashar Author

Furthermore, i mentioned about JSON.stringify and how multiple objects can be saved, however i tried to keep it as simple as possible

Some comments have been hidden by the post's author - find out more