roj*_*alo 3 history.js react-router relayjs
使用:
"react-router": "^2.0.0",
"react-router-relay": "^0.9.0",
Run Code Online (Sandbox Code Playgroud)
当我在父路径下推送任何链接时,对于每个新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
Run Code Online (Sandbox Code Playgroud)
当我记录location(从react-router)时,它不显示重复项.也许浏览器将父路径推送到基本名称?
roj*_*alo 11
更改
router.push('auth/profile')
Run Code Online (Sandbox Code Playgroud)
至
router.push('/auth/profile')
Run Code Online (Sandbox Code Playgroud)
修好了.
| 归档时间: |
|
| 查看次数: |
907 次 |
| 最近记录: |