当前位置: 首页 > news >正文

深圳龙岗是穷人区吗搜索引擎排名优化方案

深圳龙岗是穷人区吗,搜索引擎排名优化方案,软件系统开发平台,免费网站可以做cpa一、简介 react router是一个构建基于react应用的路由管理库。允许你在程序中定义不同的路由和导航规则。以实现不同的url路径显示不同的组件。 二、相关技术 Routerdivul id menuliLink to /homeHomeRouterdivul id menuliLink to /homeHome/Link/liliLink to /helloHello/Link/liliLink to /aboutAbout/Link/li/uldiv id page-containerRoute path /home component {Home} /Route path /hello component {Hello} /Route path /about component {About} //div/div /Router Link实现导航跳转 Route 配置路由定义对应组件会填充父组件。 React Router API Link - Link to /aboutAbout/Link 普通连接不会触发浏览器刷新 NavLink -  NavLink to /about activieClassName selectedAbout/NavLink         Prompt - Prompt when {fromIsHalfFilledOut}  message Are you sure you want to leave/ Redirect -  Route  exact path / render {() (loggedIn ? (Redirect to /dashboard/):(PublicHomePage/))} / url传参 react 组件可以通过 match props 获取Route 中url对应的占位符值。 // 通过match属性获取Route Path中的占位符值 const Topic ({match}) (h1Topic {match.params.id}/h1 ); export default class RouterParams extends React.PureComponent{render(){return (Routerdivul id menuliLink to /topic/1Topic 1/Link/liliLink to /topic/2Topic 2/Link/liliLink to /topic/3Topic 3/Link/li/uldiv id page-containerRoute path /topic/:id component {Topic} //div/div/Router);}} 默认情况下直接修改浏览器地址是不会触发跳转的必须通过Link或者其它React routeApi实现跳转。 嵌套路由 1.每个React组件都是路由容器。 2.React Router的声明式语法可以方便的定义嵌套路由。 举个多级目录嵌套路由例子 // 一级目录 export const Category () {return () {Routerdivul id menuliLink to /category/1Category 1/Link/liliLink to /category/2Category 2/Link/liliLink to /category/3Category 3/Link/li/uldiv id nav-containerRoute path /category/:id component {SubCategory}/div/div/Router} }// 二级目录 export const SecondCategory ({match}) {return () {Routerdivul id menuliLink to /category/${match.params.id}/sub/1Category 1/Link/liliLink to /category/${match.params.id}/sub/2Category 2/Link/liliLink to /category/${match.params.id}/sub/3Category 3/Link/li/uldiv id page-containerRoute path /category/:id/sub/:subId component {Page}/div/div /Router} }// 页面内容 export const Page ({match}) {const data getPageData(match.params.id, match.params.subid);return parseData(data); }
http://www.zqtcl.cn/news/312976/

相关文章:

  • 买卖平台有哪些网站三航奔腾建设有限公司官方网站
  • 网站建设的企业wordpress teamtalk
  • 公司起名字大全免费查询网站的哪些标签需要优化
  • 装修公司手机网站模板网络营销品牌有哪些
  • 如何保证网站安全在线的crm系统软件
  • 网站名称与主体性质不符wordpress首页锚点
  • 有口碑的常州网站建设传统网站建设
  • 大学网站建设排名金乡网站建设
  • 手机网站开发步骤徐州网站制作怎么做
  • 南通网站优化找哪家推荐做素菜的网站
  • 中国十大网站域名界面设计最好的网站
  • 苍山做网站北京便宜网站建设
  • 广州公司网站制作招聘信息汕头网站推广哪家好
  • 登录建设官方网站品牌营销专家
  • 天津模板建站哪家好wordpress标题换行显示不全
  • 杭州房地产网站建设网站建设开发公司推荐指数
  • 建设部网站上怎样查询企业业绩做淘宝联盟网站要多少钱
  • 宣武上海网站建设网站导购话术
  • 天津北京网站建设公司大网站建设公司
  • 网站需要在哪些方面备案百度云建网站
  • 西安手机网站定制网站建设西安网站注册
  • 怎么做秒赞网站企业自己建设的营销网络
  • 一般网站建设需求有哪些wordpress脚注更改
  • 海报设计在线生成免费网站排名优化方案
  • 网站开发综合设计报告怎么制作浏览器网页
  • 做网站打广告青岛网站营销推广
  • 网站建设中首页模板本科 网站建设的基础教程
  • 推广网站优化seo教程上排名抖音营销
  • 创业园区网站建设wordpress对接公众号源码
  • 怎么设计公司的网站长沙seo结算