Browsing without an account — progress is saved in this browser only.Sign in to save it
Debugging async UI: ordering and failure paths
Reading15 min
Responses do not arrive in the order requests were sent
A typeahead that applies every response will show the answer to an older query whenever that request is slower. Reproduce it by delaying the first response in a test, then make the effect ignore stale results or abort the previous request in its cleanup.
Sign in to try this knowledge check.
Optimistic updates need a rollback
Updating the UI before the server confirms is fine, but the failure branch must restore the previous state as well as show a message. Read the catch block and ask what state the screen is left in.
Sign in to try this knowledge check.