Edit in GitHubLog an issue

useSearchParam()

A React Hook that gets a search parameter from a URL and calls a provided setter function with the corresponding value.

Parameters

NameTypeDescription
props
Object
An object containing the parameter and setter function.
props.parameter
String
The parameter to search for
props.setValue
function
A setter function that is passed the parameter value found in the URL

Source Code: pwa-studio/packages/peregrine/lib/hooks/useSearchParam.js

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.