example_app
example_app copied to clipboard
Improve client-server consistency by checking response status before updating locally
Previously, the client assumed notes were accepted as soon as they were added locally (redrawNotes was called immediately after adding the note, regardless of the server response). This change improves sync by verifying the server responded with status 201 after readyState 4, before pushing to memory and redrawing.