Should CRUD changes reflect directly in local state or wait for database update?
I am learning flutter and have a general question. I am using the repository pattern, which the business/presentation layers listen to. The repository listens to the DB for new data or changes to them, and provides model representation of them. My question is, when the user for example requests to create a new todo task, the repository calls the DB to save it, then the DB calls the repository back to tell it of this new object, and only then the user sees it. is that the right approach, or should the repo just create the model directly, and when the DB calls it back it checks if the new object
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.