Skip to content

Instantly share code, notes, and snippets.

@agoldis
Created December 11, 2018 20:34
Show Gist options
  • Save agoldis/e82d12a5782b1c7cbdc6f08af8344740 to your computer and use it in GitHub Desktop.
Save agoldis/e82d12a5782b1c7cbdc6f08af8344740 to your computer and use it in GitHub Desktop.
autosave bug
User types "a" User types "b" Client's value is "ab"
^
+----------------------------+------------------------------------------------------------------------------>
+ + |
|
+--------------------------+ +--------------------------+ |
debounce rate | debounce rate | |
| | |
| | +
v v this.isSaving = false
+
+--------------------------+----------------------------+-------------------------+------------------------->
+ +
this.isSaving = true this.isSaving is still true ^
Save request issued No save request sent |
|
+ |
| |
| |
v |
|
+---------------------------------------------------------------------------------+------------------------->
+------------------------------------------------------> Server responses "OK"
Server starts
to save "a" Server's value is "a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment