Skip navigation
⚛️ React Tip: I f you want easily shareable URLs, use the useQueryParams hook. ↓
0:00 / 0:32

⚛️ React Tip: I f you want easily shareable URLs, use the useQueryParams hook. ↓

George Moller

@_georgemoller118K followers

Visit on X
727 likesDownloadOriginal post

84,777 views

⚛️ React Tip: I f you want easily shareable URLs, use the useQueryParams hook. ↓

10 Comments

Comments from the original post on X (Twitter)

  • George Moller's profile picture

    @_georgemoller

    I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics just like this one. Check them out ↓

    12 likes

  • George Moller's profile picture

    @_georgemoller

    I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics just like this one. Check them out ↓

    8 likes

  • Angel's profile picture

    @angelhodar

    I have taken the idea from your tweet and asked chatgpt to create that hook using nextjs router. It could be improved by adding zod validation and be able to separate params in several hooks (for example one subset for pagination and another one for table filtering)

    10 likes

  • Roni Rahman's profile picture

    @heyronir

    Great tip as usual George 🙌

    1 like

  • George Moller's profile picture

    @_georgemoller

    Thanks Roni! I used this hook a lot to make urls easily shareable so I thought to share it! Glad you liked it!

  • Caleb Panza ☾'s profile picture

    @CalebPanza

    Cc @jjordanwade

    1 like

  • Dayo Awobeku's profile picture

    @dayoawobeku

    sleek!

    1 like

  • George Moller's profile picture

    @_georgemoller

    Glad you liked the video Dayo!

    1 like

  • Toby's profile picture

    @tobyscript

    I almost always have to write this hook in every project I work on. Created a repo for it months ago but never worked on it. Glad to see that somebody has already done it.

    1 like

  • George Moller's profile picture

    @_georgemoller

    The same happened to me until I found useQueryParams library 😅

    1 like