使用:
"react-router": "^2.0.0",
"react-router-relay": "^0.9.0",当我将任何链接推到父路径下时,每个新的router.push调用都会在地址栏中复制父路径。
// 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)时,它不会显示副本。也许浏览器正在将父路径推到basename上?
发布于 2016-02-16 22:22:34
改变
router.push('auth/profile')至
router.push('/auth/profile')修好了这个。
https://stackoverflow.com/questions/35443526
复制相似问题