the state variable to sync
setter function to update the state variable (should be memoized with useCallback)
the key of the URL search parameter to sync with
the current URL search parameters (i.e., from useSearchParams)
function to update the URL search parameters (i.e., from useSearchParams)
function to check if the underlying state is initialized and ready to sync with URL (should be memoized with useCallback)
Util hook to keep a state variable in sync with a URL search parameter.