Skip to content
Source
Sign inSign up
TanStack/router

fix(react-router, solid-router) - useParams should only be concerned about the relevant params #5097

Mergednlynzaad(GitHub profile, opens in a new tab)merged 7 commits intomain fromrefs/pull/5097/headmerged by nlynzaad(GitHub profile, opens in a new tab)

Showing 18 changed files with 24 additions and 14 deletions (loading 13).

x
0 of 18 viewed, 18 left
7 additions and 0 deletionse2e/react-router/basic-file-based/src/components/RenderCounter.tsxAdded
View file
@@ -0,0 +1,7 @@
+import { useRef } from 'react'
+​
+export const RenderCounter = () => {
+ const renderCounter = useRef(0)
+ renderCounter.current = renderCounter.current + 1
+ return <>{renderCounter.current}</>
+}
e2e/react-router/basic-file-based/src/routeTree.gen.tsModified
View file
0 additions and 14 deletionse2e/react-router/basic-file-based/src/routes/params-ps/named/$foo.tsxDeleted
@@ -1,14 +0,0 @@
-import { createFileRoute } from '@tanstack/react-router'
-export const Route = createFileRoute('/params-ps/named/$foo')({
- component: RouteComponent,
-})
-​
-function RouteComponent() {
- const p = Route.useParams()
- return (
- <div>
- <h3>ParamsNamedFoo</h3>