TanStackT
TanStackโ€ข2y agoโ€ข
4 replies
verbal-lime

Purpose of `from` for JavaScript users

Hey ๐Ÿ‘‹๐Ÿฝ ,
I use tanstack-router in a JS project. Until now I have always tried to supply from in the navigations and then route relative. I.e.:
throw redirect({
  from: Route.fullPath,
  to: "./step-1",
  replace: true,
});

What do you recommend to JS users? The relative approach, or the absolute approach?

throw redirect({
  to: "/app/create-order/step-1",
  replace: true,
});

Thanks
Was this page helpful?