gatsby-plugin-use-query-params getting Cannot read properties of undefined (reading 'search')

106 Views Asked by At

I'm new to gatsby and i used gatsby-plugin-use-query-params for get url params. but i'm getting an issue of Cannot read properties of undefined (reading 'search'). i added my code in below,

import { useQueryParam, StringParam } from "use-query-params";

const Form = props => {
  const [firstName, setFirstName] = useQueryParam("firstName", StringParam);

....

FYI - url params are dynamic( can include or not in the url)

0

There are 0 best solutions below