报错/Warning: You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored
这个报错在以下情形会出现
第一种
<Switch>
<Route exact path="/home/index" component={HomeIndex} />
<Route path="/home/order" component={HomeOrder}>
<Route path="/home/order2" component={HomeOrder2}></Route>
</Route>
<Route path="/home/assets" component={Assets} />
</Switch>
Route组件下面不能嵌套Route组件,react-router4版本以上就不让这么写了
第二种(超级坑!!!)
<Switch>
<Route exact path="/home/index" component={HomeIndex} />
<Route path="/home/order" component={HomeOrder}>
</Route>
<Route path="/home/assets" component={Assets} />
</Switch>
Route组件之间不能有空格换行!所以,要么<Route></Route>这种样子或者写成一个自闭和标签<Route />!!!
报错/Warning: You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored的更多相关文章
- (TODO:)下载图片,报错:warning: could not load any Objective-C class information from the dyld shared cache. This will significantly reduce the quality of type information available.
想使用NSInvocationOperation下载图片,然而并没有下载下来, NSData为nil, 还有报错:(打断点就报错) warning: could not load any Object ...
- ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE
ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE 打开 /app/base/lib/application/dbtable.php , 替换A ...
- Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work.
问题:创建容器的时候报错WARNING: IPv4 forwarding is disabled. Networking will not work. # docker run -it -p 3000 ...
- 【mysql报错】MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”
MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”在命令行使用密码不安全警 ...
- scp执行报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
linux环境执行scp时会遇到报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!,如下 [root@subsname home]# scp AAA. ...
- 关于报错:Warning: Cannot modify header information - headers already sent by (output started at
8月5日,第一个项目即将完成,测试时,发现登录功能会出现小问题:记住密码的时候会报错 Warning: Cannot modify header information - headers alrea ...
- 支付宝支付php的demo或sdk报错 Warning: openssl_sign() [function.openssl-sign]: Unknown signature algorithm. in
最近在做支付宝支付,在本地测试一切正常,上传到服务器就遇到报错: Warning: openssl_sign() [function.openssl-sign]: Unknown signature ...
- php项目报错 Warning: session_start(): open(D:/software/wamp/wamp/tmp\sess_msrjot7f32ciqb1p2hr4ahejg4, O_RDWR) f
今天一个php项目报错: Warning: session_start(): open(D:/software/wamp/wamp/tmp\sess_msrjot7f32ciqb1p2hr4ahejg ...
- PHP7.1 报错 Warning Illegal string offset
报错如下: Warning: Illegal string offset '阿根廷' in F:\wnmp\www\test.php on line 24 Warning: Illegal strin ...
随机推荐
- AndroidStudio制作Nine-Patch【.9】图片
使用AndroidStudio制作Nine-Patch[.9]图片,以及为什么要制作Nine-Patch[.9]图片[以聊天气泡为例] 本文链接:https://blog.csdn.net/She ...
- 123457123456#0#-----com.yuming.FromPuzzleGame01--前拼后广--宝宝农场拼图cym
com.yuming.FromPuzzleGame01--前拼后广--宝宝农场拼图cym
- LeetCode_121. Best Time to Buy and Sell Stock
121. Best Time to Buy and Sell Stock Easy Say you have an array for which the ith element is the pri ...
- windows 2008+IIS7+Mysql+PHP5.5 + FastCGI环境配置
一.软件下载 操作系统:Windows Server 2008 R2 Enterprise (1)IIS:windows server2008系统是自带的,但要用户自己全新安装,具体方法见教程下方 ( ...
- 安装android sdk,后出现导出错误,提示命令行找不到解决方案
The steps. Rename android sdk tool folder : [Your Android SDK root]/tools -> toolsXXXX Download S ...
- 高级UI-DrawerLayout侧滑
侧滑的方案有很多种,早期的开源SliddingMenu,以及后来的DrawerLayout以及NavigationView等都可实现侧滑效果,这里介绍的是DrawerLayout,下一节将介绍Navi ...
- eNSP——ACL基础设置
原理: 实验案例: 拓补图: 实验编址: 1.基础设置 根据实验编址进行基础设置,并检测直连链路的连通性. 2.搭建OSPF网络 在所有路由器运行OSPF协议,通告相应网段到区域0. 在上一个随笔有详 ...
- RISC-V汇编指南
原文出处:https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md RISC-V Assembly Programmer's ...
- 乐字节Java反射之一:反射概念与获取反射源头class
一.Java反射机制概念 “程序运行时,允许改变程序结构或变量类型,这种语言称为动态语言”,如Python, Ruby是动态语言:显然C++,Java,C#不是动态语言,但是JAVA有着一个非常突出 ...
- [转帖]1A2C多口充 紫米USB充电器65W桌面快充版评测
1A2C多口充 紫米USB充电器65W桌面快充版评测 2019年10月04日 07:48 1786 次阅读 稿源:充电头网 1 条评论 https://www.cnbeta.com/articles/ ...