【发布时间】:2016-05-28 09:06:30
【问题描述】:
使用:
"react-router": "^2.0.0",
"react-router-relay": "^0.9.0",
当我在父路径下推送任何链接时,每次新的router.push 调用,父路径都会在 URL 栏中复制一次。
// http://localhost:3000
router.push('auth/profile')
// http://localhost:3000/auth/profile
router.push('auth/profile')
// http://localhost:3000/auth/auth/profile
router.push('auth/browse')
// http://localhost:3000/auth/auth/auth/browse
当我记录location(来自react-router)时,它不会显示重复项。也许浏览器正在将父路径推送到基本名称上?
【问题讨论】:
标签: react-router history.js relayjs