2025-05-20
1354
#react
John Reilly
131517
116
May 20, 2025 ⋅ 4 min read

Why URL state matters: A guide to useSearchParams in React

John Reilly MacGyver turned Dev 🌻❤️ TypeScript / ts-loader / fork-ts-checker-webpack-plugin / DefinitelyTyped: The Movie

Recent posts:

do not vibe code your backend

Don’t vibe code your backend: The hidden dangers of BaaS

Explore the hidden dangers of BaaS, and how frontend-focused teams can use BaaS platforms without suffering from their major risks.

Peter Aideloje
Sep 4, 2025 ⋅ 6 min read
Don’t Let AI Erase The Next Generation Of Dev Leaders

Don’t let AI erase the next generation of dev leaders

As AI tools take over more routine coding work, some companies are cutting early-career dev roles — a short-sighted move that could quietly erode the next generation of tech leaders if we aren’t careful.

Jack Herrington
Sep 4, 2025 ⋅ 6 min read

daisyUI 5 is here: What’s new and what to expect

Explore daisyUI 5’s new features, performance upgrades, and theming engine built for Tailwind CSS 4 developers.

Ikeh Akinyemi
Sep 4, 2025 ⋅ 8 min read
React and Fluent State Article by LogRocket

Building real-time state management with React and Fluent-State

Learn a clean pattern for real-time AI chat in React using Fluent-state: immutable history, async streaming, derived UI state, and side effects without useEffect.

Ikeh Akinyemi
Sep 4, 2025 ⋅ 7 min read
View all posts

5 Replies to "Why URL state matters: A guide to <code>useSearchParams</code> in React"

  1. You can update search params easily with this approach, using native useSearchParams functional update.

    setSearchParams((searchParams) => {
    searchParams.set(“greeting”, “hi”);
    return searchParams;
    });

  2. Hi,

    Great post!
    It would be nice to see a section on how to manage updating multiple keys at the same time.
    For example if you set State A then State B you will end up with only State B’s changes.

    In my case I am trying to update a start and end date that are updated by the same callback function.

    Cheers,
    Casey

Leave a Reply