T
TanStack4mo ago
extended-salmon

What is params={true} in a Link component?

This property is used in the Kitchen Sink examples in the docs, but I can't find documentation on params as a boolean.
React.useEffect(() => {
navigate({
search: (old) => ({
...old,
notes: notes ? notes : undefined,
}),
replace: true,
params: true,
})
}, [notes])
React.useEffect(() => {
navigate({
search: (old) => ({
...old,
notes: notes ? notes : undefined,
}),
replace: true,
params: true,
})
}, [notes])
<Link
from={Route.fullPath}
params={true}
search={(old) => ({
...old,
showNotes: old.showNotes ? undefined : true,
})}
className="text-blue-700"
>
<Link
from={Route.fullPath}
params={true}
search={(old) => ({
...old,
showNotes: old.showNotes ? undefined : true,
})}
className="text-blue-700"
>
React TanStack Router Kitchen Sink React Query File Based Example |...
An example showing how to implement Kitchen Sink React Query File Based in React using TanStack Router.
1 Reply
crude-lavender
crude-lavender4mo ago
it just keeps the previous path params so you dont have to repeat them

Did you find this page helpful?