• Returns a tuple of the current URL's URLSearchParams and a function to update them. Setting the search params causes a navigation.

    import { useSearchParams } from "react-router";

    export function SomeComponent() {
    const [searchParams, setSearchParams] = useSearchParams();
    // ...
    }

    Parameters

    Returns [URLSearchParams, SetURLSearchParams]