preactjs / preact-router

:earth_americas: URL router for Preact.

Home Page:http://npm.im/preact-router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preact equivalent of useLocation in react router dom

Elue-dev opened this issue · comments

I have been searching for the equivalent of useLocation for Preact but couldn't find any, is there one?

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