S
SolidJS7d ago
p

useNavigate to set search params

Whats the preferred way to set search params from useNavigate. I was thinking navigate("/path?foo=" + bar) but this feels wrong.
2 Replies
Madaxen86
Madaxen867d ago
That is fine. If you want to add/change search params on the current route there’s also the useSearchParams hook. https://docs.solidjs.com/solid-router/reference/primitives/use-search-params
useSearchParams - SolidDocs
Documentation for SolidJS, the signals-powered UI framework
p
pOP7d ago
Ok thanks!

Did you find this page helpful?