-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Bug?]: Redirect thrown from action cause resulting page to not see search params correctly #1500
Comments
In this test case above, it works. But in a fuller app it does not. Trying to improve the test case. |
I make simple cases and doesn't happen. I try in full app and it happens in runs yes, then runs no. |
Yeah I was going to say that I couldn't replicate it here. We can't help without an actual replication or anything else to go off |
Wondering if it is a race condition. I put a sample in the same route level in my real app and doesn't reproduce. Do the larger page and it does, but goes in runs of yes/no. |
Ah, the one that fails is lazy loaded route. Checking that. |
I found that in one load function for the route it called more testing... |
closing for now unless it comes back. |
Duplicates
Latest version
Current behavior 😯
In an action to a form, throw a
redirect('/whateva?q=123')
and the component that receives the routing will not see the search parameter even though the browser URL is updated. Directly loading the same URL will see the search parameter.logs
undefined, undefined
Expected behavior 🤔
After redirect to
/whateva?q=123
the above code should log123, true
but instead isundefined, undefined
Refresh then shows the correct search params.Steps to reproduce 🕹
Steps:
/whateva?q=123
/whateva
route add a component that logs theuseSearchParams().q
Context 🔦
Note: my router is from a file based route (i.e.
/routes/login.tsx
) to a route that is defined in manual route structure (i.e.<Route path={"/whateva"} component={WhatevaRoute} />
)Your environment 🌎
The text was updated successfully, but these errors were encountered: