github molefrog/wouter v3.4.0
`useSearchParams` hook

latest release: v3.5.0
5 days ago

Thanks to @guoyunhe there is now a hook for reading and writing search parameters (see #503).

import { useSearchParams } from "wouter";
const [searchParams, setSearchParams] = useSearchParams();

// Read params
searchParams.get('active'); // 'true'

// Update params
setSearchParams(prev => {
 prev.set('active', 'false'); 
 return prev;
});

Don't miss a new wouter release

NewReleases is sending notifications on new releases.