Skip to content

docs: teach router mutations through actions; formAction as the form add-on - #1662

Merged
ryansolid merged 5 commits into
v2-rebuildfrom
claude/drop-useaction-mentions
Oct 20, 2026
Merged

ryansolid merged 5 commits into
v2-rebuildfrom
claude/drop-useaction-mentions

Conversation

@ryansolid

@ryansolid ryansolid commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Before: the router data page presented a mutation as a formAction. Calling a server function from code came later, as a side note. The guides also used "action" loosely for the router's wrapper and still mentioned the deprecated action and useAction. The generated reference was behind solid next.

After:

  • Data loading and mutations starts with "Mutate with a server function". That section is a server function called inside a core action, and the mounted router applies its reload, redirect and single-flight data. It covers optimistic writes before the yield and catching the rejected yield. Next comes "Add a form with formAction", which covers what a <form> adds: the no-JavaScript URL, aria-busy, useSubmissions, .onSubmit and .with().
  • Across the router pages, "action" alone now means only the core primitive, and the router's wrapper is called a form action. Headings and anchors are renamed and the links updated.
  • Deprecated router names appear only in the migration guide and in the API reference's "Deprecated" section.
  • The generated reference is resynced with solid next (b0ad1df5). That adds a createDeferred page and folds ServerFunctionsSend into configureServerFunctionsClient, after adding both to the generator's disposition maps.

How: I checked the optimistic claim with a throwaway router test. A core action writes an optimistic store, yields a direct server function call, and the router consumer applies X-Revalidate, both with and without keys. It committed exactly [optimistic, truth] and never showed the stale cart in between. check-examples against solid, router, meta and vite-plugin checkouts reports 0 errors in 584 blocks, and the tone lint reports no errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CLHVghj7oAvSMqnq9WRKdv

Old names stay only in the migration guide and the API reference.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CLHVghj7oAvSMqnq9WRKdv
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for solid-docs-v2 ready!

Name Link
🔨 Latest commit c7c4a86
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs-v2/deploys/6ad7c7982e2a223098d5633d
😎 Deploy Preview https://deploy-preview-1662--solid-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Rename the 'Mutate with actions' and 'Post a form through a router action'
headings (and their anchors) to say form actions, call the router's wrapper a
form action wherever bare 'action' meant it, and keep 'action' for the core
solid-js primitive. Mirror the updated revalidate JSDoc in the respond,
reload and redirect reference pages.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CLHVghj7oAvSMqnq9WRKdv
@ryansolid ryansolid changed the title docs: drop deprecated router action/useAction mentions from guides docs: form action wording sweep and drop deprecated router names from guides Oct 20, 2026
autofix-ci Bot and others added 3 commits October 20, 2026 19:16
Add dispositions for createDeferred (new Reactivity page) and
ServerFunctionsSend (folded into configureServerFunctionsClient), then
regenerate the reference against solid next b0ad1df5.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CLHVghj7oAvSMqnq9WRKdv
The data page now starts mutations from a server function called inside a
core action (the mounted router applies its revalidation and redirect),
with optimistic writes and failures shown on that path. formAction follows
as the layer a <form> adds: the no-JavaScript URL, aria-busy,
useSubmissions, .onSubmit and .with().

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CLHVghj7oAvSMqnq9WRKdv
@ryansolid ryansolid changed the title docs: form action wording sweep and drop deprecated router names from guides docs: teach router mutations through actions; formAction as the form add-on Oct 20, 2026
@ryansolid
ryansolid merged commit 6e9db79 into v2-rebuild Oct 20, 2026
8 checks passed
@ryansolid
ryansolid deleted the claude/drop-useaction-mentions branch October 20, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants