Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preact equivalent of useLocation in react router dom #431

Open
Elue-dev opened this issue Sep 25, 2022 · 1 comment
Open

Preact equivalent of useLocation in react router dom #431

Elue-dev opened this issue Sep 25, 2022 · 1 comment

Comments

@Elue-dev
Copy link

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

@j67Sv89n
Copy link

j67Sv89n commented Feb 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants