-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor(router-core): begin migrating types from react-router and solid-router to router-core #3538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lid-router to router-core
View your CI Pipeline Execution ↗ for commit 86e9ae7.
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/create-router
@tanstack/directive-functions-plugin
@tanstack/create-start
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-cross-context
@tanstack/react-router
@tanstack/react-router-with-query
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-cross-context
@tanstack/solid-router
@tanstack/start
@tanstack/start-api-routes
@tanstack/start-client
@tanstack/start-config
@tanstack/start-plugin
@tanstack/start-router-manifest
@tanstack/start-server
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-handler
@tanstack/start-server-functions-server
@tanstack/start-server-functions-ssr
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
Constrain, | ||
ConstrainLiteral, | ||
RootRoute as CoreRootRoute, | ||
Route as CoreRoute, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we follow this and prefix all of these imports from router-core
with Core
? or is the DX without adding this prefix fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh this was just a way for me to alias the Route type in core but keep the current Route class in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping to settle this in a later pr because I am still not sure how the runtime will end up in core. We might still need a class in react-router and core, I really do not know
@@ -17,7 +17,7 @@ const postRoute = createFileRoute('/_postLayout/posts/$postId_')() | |||
|
|||
const protectedRoute = createFileRoute('/(auth)/protected')() | |||
|
|||
declare module '../src/fileRoute' { | |||
declare module '@tanstack/router-core' { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we move the type test to router-core as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can in another pr. atm I don't want to change them too much because I want to rely on them to check I haven't broken anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries, just trying to understand where you are heading
i just hope we can limit duplication to the absolut minimum, and this also includes tests
Presumably this change is the reason for this error?
We do createRootRouteWithContext<{ queryClient: QueryClient }>()(
{
component: Root,
wrapInSuspense: true,
},
); removing the context generic "fixes" the problem. Keeping |
@SimenB can you please open a new GitHub issue and attach a minimal example? our tests and examples did not hit that issue so we need to have a look at what you are doing differently |
The basic example fails if you remove ![]() |
Seems to be fixed in |
This PR introduce support for Solid to be used with TanStack Start. There are several ongoing refactors that can influence the timing of when it's most feasible to merge this. ### Status (build and run e2e/solid-start/basic) - [X] SSR - [x] API Routes - [x] Server Functions - [x] HMR - [x] Streaming (/stream route) - [X] Timely hydration ### Ongoing refactors Refactor to make router packages (aka. client-only features) more agnostic: - #3552 - #3540 - #3538 - #3171 Refactor to make start packages (aka. server features) more agnostic: - #3546 - #3563 - #3565 ### Upstream changes to solid-router - #3592 - #3591 - #3589 - #3616 ### Passing E2E test suites - [x] basic - [x] website - [x] scroll-restoration - [x] server-functions --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Brenley Dueck <brenleydueck@gmail.com> Co-authored-by: Iha Shin <me@xiniha.dev> Co-authored-by: Brenley Dueck <brenley@crowdbotics.com>
…lid-router to router-core (TanStack#3538) Migrates many types over but there is still a lot to do D: --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This PR introduce support for Solid to be used with TanStack Start. There are several ongoing refactors that can influence the timing of when it's most feasible to merge this. ### Status (build and run e2e/solid-start/basic) - [X] SSR - [x] API Routes - [x] Server Functions - [x] HMR - [x] Streaming (/stream route) - [X] Timely hydration ### Ongoing refactors Refactor to make router packages (aka. client-only features) more agnostic: - TanStack#3552 - TanStack#3540 - TanStack#3538 - TanStack#3171 Refactor to make start packages (aka. server features) more agnostic: - TanStack#3546 - TanStack#3563 - TanStack#3565 ### Upstream changes to solid-router - TanStack#3592 - TanStack#3591 - TanStack#3589 - TanStack#3616 ### Passing E2E test suites - [x] basic - [x] website - [x] scroll-restoration - [x] server-functions --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Brenley Dueck <brenleydueck@gmail.com> Co-authored-by: Iha Shin <me@xiniha.dev> Co-authored-by: Brenley Dueck <brenley@crowdbotics.com>
Migrates many types over but there is still a lot to do D: