- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 870
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
refactor(router-core): moving internals of Router to router core #3800
Conversation
View your CI Pipeline Execution ↗ for commit 9487084.
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/create-router
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/create-start
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-with-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-config
@tanstack/react-start-plugin
@tanstack/react-start-router-manifest
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-config
@tanstack/solid-start-plugin
@tanstack/solid-start-router-manifest
@tanstack/solid-start-server
@tanstack/start
@tanstack/start-api-routes
@tanstack/start-client-core
@tanstack/start-config
@tanstack/start-server-core
@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: |
Similar to #3800 , this use base classes to contain shared methods of the solid/react-router Route in the router-core package.
975bd31
to
1d8286c
Compare
1d8286c
to
efe78f0
Compare
There is a challenge here. The Link component lose it's type inference, for instance on the onClick event of e2e/react-start/basic/src/components/DefaultCatchBoundary.tsx, because it can't tell any longer it's in a react context. We have to explicit type it |
@chorobin , it's only types that are failing here. If I added the types in the user code e2e/example, then it works fine. would you be able to help debug how we can make the react-router Link have react types again? |
Unfortunately |
The router-core has a new RouterCore class, that the frameworks' Router class just extend
If there were framework specific methods on the Router, it would be trivial to overwrite those this way
This reduces the size of the adapter packages by a third (e.g. packages/react-router/src from ~7000 -> 4311 LOC)