![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
JA7777
这个作者很懒,什么都没留下…
展开
-
react路由
路由 实现路由的核心功能 安装 cnpm i react-router-dom 基于react-router,加入了在浏览器运行的一些功能 例如: Link组件,会渲染一个a标签 navLink组件 BrowserRouter组件 HashRouter组件 两种模式的路由(hash和history) **所有的跟组件只能调用一次,因为浏览器只有一个url地址,且所有的组件只能在跟组件内使...原创 2019-06-17 14:24:08 · 390 阅读 · 0 评论 -
路由传参
组件有如下属性: path(string): 路由匹配路径。(没有path属性的Route 总是会 匹配); exact(bool):为true时,则要求路径与location.pathname必须完全匹配; strict(bool):true的时候,有结尾斜线的路径只能匹配有斜线的location.pathname; 除了Router、Route、Link这三个react路由的基础搭配使用,还...原创 2019-06-18 10:40:49 · 137 阅读 · 0 评论