javascript - react-router使用Link传递参数
阿神
阿神 2017-04-10 17:16:26
0
1
273

照着官方的栗子来的
<Link to={{ pathname: '/user/bob', query: { showAge: true } }} activeClassName="active">Bob With Query Params</Link>
但是点击的时候浏览器却提示
Warning: Failed propType: Invalid prop to of type object supplied to Link, expected string. Check the render method of app.
换成 to=“/”就没问题了,but why?to后面只能接字符串不能是变量,那官方的栗子是怎么回事呢?求助啊大大们...

阿神
阿神

闭关修行中......

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!