Regarding the last approach about updating UI first and showing loading screen and then show if database operation succeeds and revert if database operation fails seems kinda like extra state management and unnecessary tricky rollback work.
A better approach to the last one could be just start updating backend, show a loading scren while thats happening and if it succeeds just do a UI state update.
This will save us from the work of rollback in cases of backend fails
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Regarding the last approach about updating UI first and showing loading screen and then show if database operation succeeds and revert if database operation fails seems kinda like extra state management and unnecessary tricky rollback work.
A better approach to the last one could be just start updating backend, show a loading scren while thats happening and if it succeeds just do a UI state update.
This will save us from the work of rollback in cases of backend fails