Repository navigation
fix(router): serialize less router state - #9090
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 49f841a The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@qwik.dev/core
@qwik.dev/router
@qwik.dev/utils
eslint-plugin-qwik
create-qwik
@qwik.dev/optimizer
@qwik.dev/devtools
@qwik.dev/mcp
commit: |
Varixo
reviewed
Sep 30, 2026
maiieul
force-pushed
the
claude/router-lean-state
branch
from
September 30, 2026 15:26
731828c to
f60f23b
Compare
Contributor
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
The head store was deep and DocumentHeadTags spread it, so every field, head array and meta entry added a subscription and back-ref roots to the state. The router replaces head fields wholesale, so a shallow store and one all-props subscription cover every update.
- actionDataSignal kept the whole response envelope (status message, form data) although the head only reads the action result. - routeInternal's initial value only serves SSR; the client rebuilds it from routeLocation on its first navigation. - routeLoaderCtx was a store that nothing tracks.
- A 200 OK httpStatus is stored as undefined and useHttpStatus() returns the default. - usePreventNavigate$ imports registerPreventNav instead of reading a QRL from a context.
Since 3b7b79e the loader request computes its own fetch path, so the __qwik_route_loader_value__ entry is written but never read. It added ~46 bytes per loader to every page.
maiieul
force-pushed
the
claude/router-lean-state
branch
from
October 6, 2026 10:31
f60f23b to
49f841a
Compare
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.
What is it?
Description
Every page serializes less router state: the document head gets one subscription instead of one per field, and server-only values, defaults and an unused loader marker stay out of the state. On the starter's home page, router state drops from 2.5 KB to 1.7 KB.