Episode 16 game · Raiden · Lightning
Outrun the Twin Oni
Kai clicks Kitsu, then Raiden, and the card ends up showing Kitsu. Feel two fetches race and the slow one paint last, give the effect a cleanup that aborts the old request, then prove that only the latest request gets to answer.
Effect: no cleanup
Each click starts a request. Watch the order they finish in.
1 · Feel the race
This page fetches the selected hero in an effect with no cleanup. Click Kitsu, then Raiden within two seconds.
2 · Give the effect a cleanup
Pick how the old request ends, then decide which errors still reach the screen.
3 · The race test
Kitsu, Raiden and Vayu clicked in quick succession on a throttled network, then one request that really fails. Only the latest request may answer.
New seal earned
The twins tripped over each other
Acharya’s Rule #16Only the latest request gets to answer. Abort or ignore the rest.
Two requests in flight can finish in any order. The last setState wins.
Pass { signal } to fetch and return () => controller.abort() from the effect.
Ignore err.name === 'AbortError'; every other error is real and should show.