📌  相关文章
📜  useHistory 和 props.history 之间的区别 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:40.706000             🧑  作者: Mango

代码示例1
//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
    });