T
TanStack3w ago
xenophobic-harlequin

Using <Link> to "/projects/$id/$taskId" results in redirect.

I am not able to go to the "/projects/$id/$taskId" route from a link component, but it is working fine with an anchor tag. This is how I implemented it:
<Link
from="/projects/$id"
to="$taskId"
params={{ taskId: task.id }}
className="block"
>
...
</Link>
<Link
from="/projects/$id"
to="$taskId"
params={{ taskId: task.id }}
className="block"
>
...
</Link>
I get this warning on console log
Could not find match for from: /projects/$id/
overrideMethod @ installHook.js:1
setTimeout
(anonymous) @ tasks-section.tsx:359
Could not find match for from: /projects/$id/
overrideMethod @ installHook.js:1
setTimeout
(anonymous) @ tasks-section.tsx:359
3 Replies
fair-rose
fair-rose3w ago
<Link
to="/projects/$id/$taskId"
params={{ taskId: task.id, id: ... }}
className="block"
>
...
</Link>
<Link
to="/projects/$id/$taskId"
params={{ taskId: task.id, id: ... }}
className="block"
>
...
</Link>
The error says that the current route (the one you render) is not /projects/$id
xenophobic-harlequin
xenophobic-harlequinOP3w ago
well it is in /projects/$id though. thanks.. I tried this but got the same error. it keeps redirecting me back instantly to /projects/$id
fair-rose
fair-rose3w ago
Hmmm.... Do you have any reproduction?

Did you find this page helpful?