Skip to content
Source
Sign inSign up
TanStack/router

fix(solid-router): Should not remount deps when remountDeps does not change #5693

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/5693/headmerged by birkskyum(GitHub profile, opens in a new tab)

Showing 2 changed files with 13 additions and 8 deletions.

x
0 of 2 viewed, 2 left
1 addition and 1 deletione2e/solid-router/basic-file-based/tests/app.spec.tsModified
View file
@@ -273,7 +273,7 @@
await expect(page.getByTestId('post-title')).toContainText('sunt aut facere')
​
-test.skip('Should not remount deps when remountDeps does not change ', async ({
+test('Should not remount deps when remountDeps does not change ', async ({
page,
}) => {
await page.goto('/notRemountDeps')
12 additions and 7 deletionspackages/solid-router/src/Match.tsxModified
View file
@@ -222,19 +222,22 @@
​
const match = () => matchState().match
​
+ const componentKey = () => matchState().key ?? matchState().match.id
+​
const out = () => {
const Comp = route().options.component ?? router.options.defaultComponent
if (Comp) {
- const key = matchState().key ?? matchState().match.id
- return (