📅  最后修改于: 2022-03-11 15:01:40.706000             🧑  作者: Mango
//You can use useHistory() in any component,
//but props.history only in components where the history is available in props
//When you use history.push, you do NOT have to specify the pathname.
const queryString = new URLSearchParams(params).toString()
history.push({
search: "?" + queryString
});