Skip to content

Commit

Permalink
Merge branch 'beta' of https://github.com/TanStack/router into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Jul 8, 2023
2 parents 1c2d94e + 67d8e44 commit 5e20c34
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 35 deletions.
4 changes: 3 additions & 1 deletion docs/guide/route-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ const userRoute = new Route({
path: '$userId',
})

const routeConfig = rootRoute.addChildren([userBaseRoute])
const routeConfig = rootRoute.addChildren([
usersRoute.addChildren([userRoute])
])
```

Dynamic segments can be accessed via the `params` object using the label you provided as the property key. For example, a path of `/users/$userId` would produce a `userId` param of `123` for the path `/users/123/details`:
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic-ssr-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"dependencies": {
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@tanstack/router-cli": "0.0.1-beta.69",
"axios": "^1.1.3",
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic-ssr-with-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"dependencies": {
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@tanstack/router-cli": "0.0.1-beta.69",
"axios": "^1.1.3",
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"dependencies": {
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@tanstack/router-cli": "0.0.1-beta.69",
"axios": "^1.1.3",
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"start": "vite"
},
"dependencies": {
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/react-actions": "0.0.1-beta.90",
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^1.1.3",
"axios": "^1.1.3",
"immer": "^9.0.15",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/kitchen-sink-multi-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"start": "vite"
},
"dependencies": {
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/react-actions": "0.0.1-beta.90",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^1.1.3",
"axios": "^1.1.3",
"immer": "^9.0.15",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/kitchen-sink-single-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/react-actions": "0.0.1-beta.90",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^1.1.3",
"axios": "^1.1.3",
"immer": "^9.0.15",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/quickstart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"start": "vite"
},
"dependencies": {
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^1.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/start-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@tanstack/bling": "^0.4.0",
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/react-start": "0.0.1-beta.83",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^3.1.0",
"astro": "^2.0.16",
"concurrently": "^7.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/start-kitchen-sink-single-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/react-actions": "0.0.1-beta.90",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^1.1.3",
"axios": "^1.1.3",
"immer": "^9.0.15",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/with-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@tanstack/react-query": "^4.14.1",
"@tanstack/react-query-devtools": "^4.14.1",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@vitejs/plugin-react": "^1.1.3",
"axios": "^1.1.3",
"immer": "^9.0.15",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/with-trpc-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"dependencies": {
"@tanstack/react-query": "^4.14.1",
"@tanstack/react-query-devtools": "^4.14.1",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@trpc/client": "^10.0.0-rc.6",
"@trpc/react-query": "^10.0.0-rc.6",
"@trpc/server": "^10.0.0-rc.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/with-trpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@tanstack/react-loaders": "0.0.1-beta.90",
"@tanstack/react-query": "^4.14.1",
"@tanstack/react-query-devtools": "^4.14.1",
"@tanstack/router": "0.0.1-beta.92",
"@tanstack/router-devtools": "0.0.1-beta.92",
"@tanstack/router": "0.0.1-beta.93",
"@tanstack/router-devtools": "0.0.1-beta.93",
"@trpc/client": "^10.0.0-rc.6",
"@trpc/react-query": "^10.0.0-rc.6",
"@trpc/server": "^10.0.0-rc.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/router-devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/router-devtools",
"author": "Tanner Linsley",
"version": "0.0.1-beta.92",
"version": "0.0.1-beta.93",
"license": "MIT",
"repository": "tanstack/router",
"homepage": "https://tanstack.com/router/",
Expand Down
10 changes: 2 additions & 8 deletions packages/router/__tests__/createRoutes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('everything', () => {
})
const testRoute = new Route({
getParentRoute: () => rootRoute,
component: lazy(() => import('./TestComponent'), 'NamedComponent'),
path: 'test',
validateSearch: (search) =>
z
Expand Down Expand Up @@ -144,12 +145,6 @@ describe('everything', () => {
component: () => 'layout-b',
})

const testRoute = new Route({
getParentRout: () => rootRoute,
path: 'testPath',
component: lazy(() => import('./TestComponent'), 'NamedComponent'),
})

const routeTree = rootRoute.addChildren([
indexRoute,
testRoute,
Expand All @@ -159,8 +154,7 @@ describe('everything', () => {
usersRoute.addChildren([userRoute]),
]),
authenticatedRoute.addChildren([authenticatedIndexRoute]),
layoutRoute.addChildren([layoutARoute, layoutBRoute]),
testRoute,
layoutRoute.addChildren([layoutARoute, layoutBRoute])
])

type MyRoutesInfo = RoutesInfo<typeof routeTree>
Expand Down
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/router",
"author": "Tanner Linsley",
"version": "0.0.1-beta.92",
"version": "0.0.1-beta.93",
"license": "MIT",
"repository": "tanstack/router",
"homepage": "https://tanstack.com/router",
Expand Down

0 comments on commit 5e20c34

Please sign in to comment.