mirror of
https://github.com/streamich/react-use.git
synced 2025-12-08 18:02:14 +00:00
docs: useSearchParam warning about hash routers, closes #637
This commit is contained in:
parent
03ccfa9845
commit
471da2aea3
@ -2,7 +2,6 @@
|
||||
|
||||
React sensor hook that tracks browser's location search param.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```jsx
|
||||
@ -27,3 +26,7 @@ const Demo = () => {
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
## Caveats/Gotchas
|
||||
|
||||
When using a hash router, like `react-router`'s [`<HashRouter>`](https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/api/HashRouter.md), this hook won't be able to read the search parameters as they are considered part of the hash of the URL by browsers.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user