Should I use JSON or SQLite for my to-do list app?
Asked by
reading_lamp_club
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?
Answers
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.
Reply to this answer
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.
Reply to this answer
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.
Reply to this answer
Why not give both methods a spin? They can both work for your app, and it's a great learning experience to compare them.
Reply to this answer
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.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions