-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirecting no longer appears to work on first render #417
Comments
We had the same issue and switching from
The readme should probably be updated to have a working example of how to do redirects. |
A workaround is to use setTimeout(() => route('/', true), 0); |
Still having this issue on 4.1.2. @premasagar your workaround still works btw |
I'm running into the same problem. It seems this is caused when you call Lines 187 to 194 in 93f1cda
I'm not sure if this would cause other problems though. Can anyone give any insight to this? |
Also having the same issue |
Hi, I just updated to v4.0.1 and was trying to use a redirect component as shown in the docs, but redirecting no longer appears to work on the initial render.
See the JSFiddle here: https://jsfiddle.net/vgo2p4b6/1/ - the first render should redirect to Johns Profile, but nothing is matched instead, and clicking the home button anytime after that redirects as expected.
I've tried using the new
useRouter
to no success either, the second array item method works the same.Using the
router.routeTo
method from the first array item renders the correct component, but does not update the url.The text was updated successfully, but these errors were encountered: