Redirect to same route
When I try to redirect to the same route with a new
search
object it doesn't keep the search parameter from the redirect. I have tried with my mask
and without it.
Outputs the logs
beforeLoad: { code: ..., state: ... }
'redirecting'
beforeLoad: { showPriority: true }
priority: {},
priority: {},5 Replies
crude-lavender•2mo ago
national-goldOP•2mo ago
Now that the code and state parameters always exist I am getting an endless loop. Because it is always redirecting with those params. I only want
showPriority
to go through to the component. Am I supposed to be returning something different from beforeLoad
when it has the search params I want?skilled-lime•2mo ago
just don't throw a redirect in that case then?
flat-fuchsia•2mo ago
What's the difference in terms of behavior when you throw a redirect or not?
skilled-lime•2mo ago
i meant: just throw the redirect if you want to redirect, here this means: if the search param is already present, then dont throw a redirect