Skip to content

Router next.41: formAction, useAction deprecated, single flight on any server function - #1661

Merged
ryansolid merged 1 commit into
v2-rebuildfrom
claude/project-thread-257vck
Oct 20, 2026
Merged

ryansolid merged 1 commit into
v2-rebuildfrom
claude/project-thread-257vck

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Before: the 2.0 docs teach the router's action and useAction. They also say a server function called directly from an event handler doesn't revalidate, and that the router's single flight is installed by the first action.

After (matching @solidjs/router 2.0.0-next.41, solidjs/solid-router#688):

  • The router's action is documented as formAction (Action becomes FormAction). The old names are covered as deprecated aliases in the reference and the migration guide.
  • useAction is deprecated. Pages now call the server function directly, and the durable-generation chat example drops it.
  • A mounted router applies revalidation, redirects and flight data on any server function call. Every POST is treated as a mutation and revalidates the queries on screen. Reads through query() and GET() are exempt, and respond(value, { revalidate: "" }) opts a non-mutation out.
  • The troubleshooting entry that blamed direct calls is rewritten, and the integrate-a-router page no longer describes the old action-gated rendezvous.
  • Core solid-js action usages are unchanged.

This touches 17 pages: router data and its reference/types/index, server functions (mutations and responses, progressive enhancement, durable generation, index), forms, protected routes, the from-solid-router migration, integrate a router, server rendering, the overview, data-fetching patterns and the glossary.

Validation:

  • node scripts/check-examples.mjs --solid <solid next> --router <router next> --vite-plugin <plugin> --meta <npm @solidjs/meta> --ref checks 1346 blocks and passes for every changed page. Its 5 errors are all in unchanged @solidjs/meta pages and come from the older npm meta package being missing Head/Script exports.
  • prettier --check passes on the changed files.
  • scripts/lint-tone.mjs reports 0 errors.

Generated by Claude Code

…single flight

Update the Solid 2.0 docs for @solidjs/router 2.0.0-next.41
(solidjs/solid-router#688):

- Router `action`/`Action` are now `formAction`/`FormAction`; the old names
  are documented as deprecated aliases. Core solid-js `action` is unchanged.
- `useAction` is deprecated with no replacement: call the server function
  (or a core `action` around it) directly.
- A mounted router applies any server function's revalidation, redirect,
  reload and flight data, including direct calls from event handlers.
- Every POST server function call is a mutation that revalidates on-screen
  queries by default; `respond(value, { revalidate: "" })` opts out, and
  `query()`/`GET()` reads are exempt.

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 c827716
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs-v2/deploys/6ad7af94835b43d3033106c1
😎 Deploy Preview https://deploy-preview-1661--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.

@ryansolid
ryansolid merged commit fe758c7 into v2-rebuild Oct 20, 2026
8 checks passed
@ryansolid
ryansolid deleted the claude/project-thread-257vck branch October 20, 2026 19:01
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