mardi 1 décembre 2020

Angular call API or handle in frontend

I am curious about opinions on the following problem/question:

I have a larger object, which is loaded from the database via an API call. The object contains several lists of (other) objects. For each list, data can be added, deleted, or updated via a dialog, inside which all the object's save-, update-, edit-API calls are handled.

Now the question is: After closing the dialog, the list is not up to date anymore (i.e. an element has been added to the database, but is not shown in the list on the UI yet).
Is it "cleaner" to reload the required part of my object from the API or to add/update/delete the entries of the list via code on the frontend itself?




Aucun commentaire:

Enregistrer un commentaire