Edit in GitHubLog an issue


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


propsObjectAn object containing the parameter and setter function.
props.parameterStringThe parameter to search for
props.setValuefunctionA 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 my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.