Page is not loading when using router.push() properly. #58940
Replies: 3 comments 8 replies
-
try |
Beta Was this translation helpful? Give feedback.
-
When you try to navigate from the client side to a route generated server side, you might run into some problems. You can try the following approach:
Essentially, you wrap your route around a SSR component and have it redirect instead. You then trigger the redirect on the client side by calling router.refresh() |
Beta Was this translation helpful? Give feedback.
-
Faced same behaviour of router. Fixed by |
Beta Was this translation helpful? Give feedback.
-
Summary
I am trying to implement a log-in route, where a
form
should be there, when a user log-in, (if the user provides valid information) the user should be redirected to the root route. I'm implementing it withreact-hook-form
for validation purpose, so, to submit the form I have to useonSubmit
insted ofaction
attribute.Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions