How I can set search params when using @reach/router? I just used props.history.push but props.history still undefined. Here is my code when page state chage
const handleChangePage = page => {
setPage(page)
const query = new URLSearchParams(props.location.pathname)
props.history.push({
pathname: props.location.pathname,
search: query.toString(),
})
//??? I want to set page for url similar to /product?page=3&limit=4
}