Scene: I am building a simple calendar web-app that uses React for the front-end and MySQL on the back-end for the server. The app retrieves a list of all the events from the server when it is first mounted, displays them to the user and allows for CRUD operations. Everything works as expected.
Question: On a Create, Update or Delete operation, should I:
Update the database and the state "independently".
Update the database, make another call to the server to retrieve the new list of events and then set the state equal to this new list.
Do something else entirely.
Impetus: I am working under the impression that there should be a "single source of truth" for my data, and it feels likes the first option above creates a situation where I have two "sources" that could in some situation become out of sync.