Comments (5)
This is the relevant snippet from the docs:
https://tanstack.com/router/latest/docs/framework/react/guide/navigation#search-param-links
🧠 Did you notice that how we didn't even need to supply a to prop? By default, all navigations are relative to the current route, so if you don't supply a to prop, it will just update the current route's search params.
Did this ever work? If yes, how was it typesafe?
from router.
It relies on the from being specified. At one point the to defaulted to “.” Which would resolve to the same route as from.
from router.
Specifying from="."
still results in the same type error. Updated the stackblitz with that example.
from router.
no, that won't work either. You have to specify a real route as from
.
from router.
Whoops, misread Tanner's comment. Can confirm adding to="."
gets rid of the type error
from router.
Related Issues (20)
- File base subroutes regression HOT 4
- Context is undefined when search validation fails HOT 1
- Incorrect not found component being rendered HOT 3
- Overlapping Keys Cause Type Issues Using Experimental Intersection
- `Route.fullPath` is typed incorrectly when using path params HOT 8
- Undefined context after redirect HOT 5
- `beforeLoad` does not run when resetting from `errorComponent`
- `matchRoute` from `useMatchRoute` doesn't resolve TS type with pathless (layout) routes HOT 1
- [router-generator] index route underneath layout route inside of route group not working
- URIError: URI malformed HOT 5
- Issue with `useBlocker` when navigating to route with `beforeLoad` and `redirect`
- Updating to 1.34.9 causes issue with useRouter HOT 1
- Can't use $ route params when using Microsoft TFVC
- Typescript: useRouteContext with strict: false
- SSR streaming is throwing error
- `search` seems to be inferring the output type of the `validateSearch` instead of `z.input` HOT 1
- Unexpected behavior with not found component specified in the __root HOT 4
- Root route is rendered before loaders are finished HOT 2
- TanStackRouterDevtools broken when rendering inside of a shadow DOM HOT 2
- Link.from prop in layout crashes (started in v1.35.1) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from router.