📌  相关文章
📜  browserrouter 当前路径 - Javascript 代码示例

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

代码示例1
import { useLocation } from 'react-router-dom'

function HeaderView() {
  const location = useLocation();
  console.log(location.pathname);
  return Path : {location.pathname}
}