正在加载视频...

视频加载失败

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

84,767 次观看 • 2 年前 •via X (Twitter)

10 条评论

George Moller 的头像
George Moller2 年前

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 ↓

George Moller 的头像
George Moller2 年前

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 ↓

Angel 的头像
Angel2 年前

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)

Roni Rahman 的头像
Roni Rahman2 年前

Great tip as usual George 🙌

George Moller 的头像
George Moller2 年前

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 ☾ 的头像
Caleb Panza ☾2 年前

Cc @jjordanwade

Dayo Awobeku 的头像
Dayo Awobeku2 年前

sleek!

George Moller 的头像
George Moller2 年前

Glad you liked the video Dayo!

Toby 的头像
Toby2 年前

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.

George Moller 的头像
George Moller2 年前

The same happened to me until I found useQueryParams library 😅

相关视频