react-use icon indicating copy to clipboard operation
react-use copied to clipboard

Add a useAllSearchParam hook

Open bosi-programming opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. useSearchParam.ts only returns a single search param, however, I often want to get more than just a single URL search param and I don't want to keep instantiating the same hook for each time I want another param.

Describe the solution you'd like I would like a hook that returns all search params instead of just a single one

Describe alternatives you've considered The only solution that I thought of was coping and pasting the hook on my project substituting the .get on line 4 for entries and using it to iterate all params and return an object

bosi-programming avatar Sep 26 '22 23:09 bosi-programming

If more people are interested in this feature, I can work on it too.

bosi-programming avatar Sep 26 '22 23:09 bosi-programming