Hang on...

What if this happens?

1. User makes a mutation

2. UI updates instantly

3. User closes the app before sync happens

4. User comes back and is surprised to see that their mutation did not actually happen

The loading / error / success states in a UI serve a purpose.

Presumably you could trigger one of those onbeforeunload confirmation dialogs in that case.

I assume you would also have some sort of icon that indicates all of the changes you made have been synced (or the opposite, an icon for when they haven't yet).

Though of course, it doesn't help if the user outright kills the app or pulls the plug or whatever. But I think in that case they should expect to lose some data?