Chapter 15 · Example 2 · Data fetching and race conditions

Stale fetch overwrites fresh

Navigating forward then quickly back lets the slow first fetch resolve last, so its setData overwrites the correct data with stale content.

Loading live editor…