Repository navigation
docs: when async work stops, and actions that outlive their page - #1668
Merged
Merged
Conversation
Adds a "Stop the work a run started" section to the async concept page: a never-committed run is cleaned up when superseded (so onCleanup + AbortController cancels an unfinished request), the run on screen stays live until its replacement lands, and waiting on that cleanup from inside the replacing update can deadlock. Mutations gains a common-problems entry for a save that keeps running after navigation (by design; guard post-yield steps, don't retire actions from onCleanup). Follows solid #4222 / #4223. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
|
|
✅ Deploy Preview for solid-docs-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the async guides said Solid drops stale responses with "no
AbortController", but never explained that the superseded request keeps running, how to cancel it, or when a run'sonCleanupfires. Nothing covered a save that keeps going after the user navigates away.After: the async concept page has a "Stop the work a run started" section:
onCleanup+AbortControllerregistered before the firstawaitcancels an unfinished request;Data fetching patterns links to that section from the stale-response bullet. Mutations gains a common-problems entry: actions aren't cancelled by navigation (often the action itself navigates), so guard post-
yieldsteps instead and don't retire an action fromonCleanup.How: mirrors solid
next3cbfaf1a (documentation/solid-2.0/05-async-data.md) and the rulings on solidjs/solid#4222 and #4223. It describes released rc.17 behavior only:from()(#4218) and the failed-replacement fix (#4228) are not released yet, so they're left out.Generated by Claude Code