S
SolidJS3mo ago
Mobs

Set search params after navigate

Hi, how do I set search params after I navigate to a new path?
1 Reply
peerreynders
peerreynders3mo ago
I don't understand your question. When you navigate to a route, the search parameters are specified as part of the to appended as parameters to the route path. Once you've navigated it's too late to change the search params. After navigation search params can be accessed inside a component via useSearchParam or inside a load function using the location.search property which can be used to construct a URLSearchParams for more convenient access.
MDN Web Docs
What is a URL? - Learn web development | MDN
With Hypertext and HTTP, URL is one of the key concepts of the Web. It is the mechanism used by browsers to retrieve any published resource on the web.