Last 12 weeks · 13 commits
4 of 6 standards met
Describe the bug A shared parent layout is torn down and re-created on every navigation between its child routes, even though its route stays in the match chain and the router correctly reuses its route context. This contradicts the documented behavior: Solid Router reuses a matched route context while its route definition remains in the next match chain. Moving between sibling child routes therefore keeps their shared parent layout mounted. The bug affects any nested routes -- path-ful and pathless layouts alike. Only navigations that change no level of the match chain (same leaf route, different params) are unaffected. Fallout: everything that lives in a layout is destroyed per click -- component state resets, fires, providers are re-created, and CSS transitions never play. Your Example Website or App https://github.com/cradle-song/repro-solid-router-remount Steps to Reproduce the Bug or Issue 1. Open the app (with the browser console visible) 2. Click Page A 3. Click Page B Expected behavior The page shows . One console log at startup, new clicks do not log anything. Screenshots or Videos The page shows . Every click logs new Platform Version: 2.0.0-next.17 Additional context Suggested fix in repo README.
Fixes #583. `mergePropssplitPropsrenderToStringmergePropsactiveClassinactiveClass??mergePropsundefinedlocation.pathnamenormalizePathdecodeURItoLowerCaseJSON.stringifystateJSON.stringify(undefined)undefinedclassListsplitPropsmergePropsisServerrenderToStringendactiveClassinactiveClassclassclassListstatetargetrelreplacenoScrollpreloadidaria-labelmainlink="true">link="true" >maintest/anchor.spec.tsxendclassListmaintest/ssr/anchor.spec.tsxmainisServervitest.ssr.config.tstest:ssrpnpm testtest:typesAmergePropsARouterRoutemergePropssplitPropssplitlinkbooleanboolean | stringlink="true"childrensplitPropsprops.children` in a memo.
Summary Bump / / devDependencies to and raise the peer ranges to . Adapt to rc.1's new signature: moved from the second argument to the third (), so the code-split branch now calls . The peer floor bump is required, not cosmetic: on rc.0, takes second, so the adapted call would silently drop it — losing the URL that SSR resolves client assets against. Conversely, rc.1's dev build throws on the old string-second-argument call. Verification Full suite green on rc.1: 348 client tests, 28 server tests, type checks, build. Reproduced the breakage end-to-end in a fullstack SSR test app pinned to solid 2.0.0-rc.1 with the published : production SSR logs and the route chunks are absent from the SSR HTML. With this branch linked in, the warning is gone, the SSR HTML preloads the route chunks (, ), both and render, and hydration works (event replay + counter interactivity verified in the browser). Patch changeset included, following the rc.0 bump convention. 🤖 Generated with Claude Code
Repository: solidjs/solid-router. Description: A universal router for Solid inspired by Ember and React Router Stars: 1317, Forks: 176. Primary language: TypeScript. Languages: TypeScript (76.5%), JavaScript (23.5%). License: MIT. Open PRs: 11, open issues: 29. Last activity: 3d ago. Community health: 75%. Top contributors: ryansolid, rturnq, Brendonovich, birkskyum, atilafassina, Brendan-csel, oedotme, Jutanium, jpdutoit, jchatard and others.