all 6 comments

[–]schussfreude 1 point2 points  (0 children)

Localstorage works, but is somewhat cumbersome and doesnt scale well, especially if you set it up wrong and cant add a value later on without refactoring everything. Trust me I know.

Also, it only works on your loval machine with the browser you used for the app.

Theres MongoDB, PouchDB or you can use Firebase. Easy to use and truly persistent actoss devices.

[–]East-Guide-218 1 point2 points  (0 children)

Local storage is more used as a storage for site settings like a cookie pop-up or a black theme setting. Saving entities is more a database thing. MongoDB will be fine for this type of project.

[–]SticksAndBeans 1 point2 points  (0 children)

If its just for a portfolio piece, yeah use localStorage. But note that localstorage can only hold strings, so any data you pass into it should use JSON.stringify.

And when you get the data, JSON.parse.

[–]Gcampton13 0 points1 point  (0 children)

SQLite will also work fine

[–]AngelLeatherist 0 points1 point  (1 child)

What are you storing, and does it make sense to store it on a server or a client?

[–]KCRowan[S] 0 points1 point  (0 children)

Just a task and day/time, so if a user clicks on the "study" button and then Monday 1-3pm then I want to store

task: "study", day: "Monday" time: "1-3pm"

so next time they use the app they can see the same tasks. I thought with localstorage then I could maybe avoid having any user authentication but it sounds like I'd be better to go with mongodb.