Preact equivalent of useLocation in react router dom
Elue-dev opened this issue · comments
Wisdom commented
I have been searching for the equivalent of useLocation for Preact but couldn't find any, is there one?
j67Sv89n commented
I think it's related to this:
https://developer.mozilla.org/en-US/docs/Web/API/Location
Location.pathname
const searchParams = new URLSearchParams(location.search);
URLSearchParams - Web API