ethanniser / next-typesafe-url

Fully typesafe, JSON serializable, and zod validated URL search params, dynamic route params, and routing for NextJS.
https://next-typesafe-url.dev
MIT License
362 stars 16 forks source link

Add updateSearchParams function to useSearchParams hook #89

Open itelo opened 5 months ago

itelo commented 5 months ago

This PR:

I love the idea from https://github.com/ethanniser/next-typesafe-url/issues/84. I added the code needed, and it works as suggested in https://github.com/ethanniser/next-typesafe-url/issues/84#issuecomment-1904482503.

[] ~Yes, I have made a changeset~ Not yet; I want to make sure I'm on the right path before I finish this PR

Missing tests 👀

ethanniser commented 5 months ago

Thanks for this

I just got back from Europe today and have a lot this week, so gimme a couple days to review

If I forget feel free to ping me

itelo commented 5 months ago

@ethanniser can you take a look at this? I believe I will need to add react-testing-library to test the hook

ethanniser commented 5 months ago

sorry I took so long, just had a look and I like it and think it has a place

the stuff I would like to see:

and then will need tests + docs but overall I think this will be a good addition thanks for the contribution