How to jump to a route in native JS? #1743
Answered
by
liu-jin-yi
liu-jin-yi
asked this question in
Q&A
-
I want to jump to the login page after the token expires in axios. I used window.location.href = "/login"; before, but there is a problem in electron. What is the correct way to jump in native JS? |
Beta Was this translation helpful? Give feedback.
Answered by
liu-jin-yi
Jun 17, 2024
Replies: 1 comment 3 replies
-
are you looking for https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally, I had to extract createRouter into a new file and export it for use.