Should I use JSON or SQLite for my to-do list app?

0
20
Asked By MountainBiker22 On

I'm building a simple to-do list app using Expo React Native, and I'm trying to decide between storing my data in JSON objects with AsyncStorage or using a local SQLite database. Since I want to save tasks for each day, what approach do you think is better?

5 Answers

Answered By DevGuru32 On

Just a heads up, when you talk about JSON objects, remember that JSON is a format for transmitting data. You actually serialize a Javascript Object into a JSON string. For learning purposes, why not try both? You could set up your app in a way that switching storage later would be easy.

Answered By TaskMaster101 On

Why not give both methods a spin? They can both work for your app, and it's a great learning experience to compare them.

Answered By CodingWanderer88 On

I'd recommend going with SQLite. It's a good way to learn about databases and SQL. Plus, it'll help you understand how to manage data better in the long run.

Answered By AppEnthusiast77 On

For a small local to-do app, either way works. If it's just a quick project for learning, using AsyncStorage with JSON is perfectly fine. You can structure your data like this:
{"2025-12-06": [{"id": 1, "text": "Buy milk", "done": false}, {"id": 2, "text": "Study Kotlin", "done": true}]}
Just read and write that object, and you’re good to go. But if you’re planning to keep adding features and maybe even sync with a backend down the line, learning SQLite might be the way to go.

Answered By DataNinja44 On

If you're leaning towards a database, I'd definitely suggest SQLite or even Postgres for a broader learning experience. It's widely used in the workplace.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.