I’m developing the application in NextJS with MongoDB. This app features a list of tasks with checkboxes and buttons. If the user selects the correct combination of checkboxes, they receive a score of 1.
The question is: Where should I store the score?
One option that comes to mind is to use local storage for a quick response and to avoid a lot of requests to the DB.
The second one: when the user completes a task and earns a score, send a request to API endpoint to store the score directly in the database.