报错/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 ...
随机推荐
- ps 快捷键大全
一.工具箱(多种工具共用一个快捷键的可同时按[Shift]加此快捷键选取)矩形.椭圆选框工具 [M]移动工具 [V]套索.多边形套索.磁性套索 [L]魔棒工具 [W]裁剪工具 [C]切片工具.切片选择 ...
- (六)利用JackSon工具将JSON文件和对象互转
1. 需要下载JackSon工具,并导入到: 2. 编写html页面: <!DOCTYPE html> <html> <head> <meta charset ...
- 下载Hadoop环境的虚拟机文件
使用的是hortonworks的hadoop环境, 下载地址:https://hortonworks.com/downloads/#
- iOS——使用FMDB进行数据库操作(转载)
iOS 使用FMDB进行数据库操作 https://github.com/ccgus/fmdb [摘要]本文介绍iOS 使用FMDB进行数据库操作,并提供详细的示例代码供参考. FMDB 使用方法 A ...
- Bugly——Xuporter问题处理
Unity接入Bugly 用其原生的package文件导入,结果在Ios打包时报错,找不到相对应的库. 经过排查: 这个地方如果不加拦截的话,项目中所有的 .projmods文件都会按照xupor ...
- OS选择题练习
一.死锁 1.设系统中有n个进程并发,共同竞争资源X,且每个进程都需要m个X资源,为使该系统不会发生死锁,资源X的数量至少为() A.n*m+1 B.n*m+n C.n*m+1-n D.无法预计 ...
- [转帖]微软宣布即将开始大规模推送Windows 10 V1903重大版本更新
微软宣布即将开始大规模推送Windows 10 V1903重大版本更新 https://www.cnbeta.com/articles/tech/894303.htm 微软要批量更新 1903了 bu ...
- [转帖]Linux中awk工具的使用
Linux中awk工具的使用 2018年10月09日 17:26:20 谢公子 阅读数 2170更多 分类专栏: linux系统安全 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权 ...
- java日志框架系列(8):logback框架PatternLayout详解
当你想要将记录以你想要的的格式写到目的地时,那么你就需要了解如何设置自定义的格式了. 1.PatternLayout 转换模式:由文本文字和格式转换符组成. 下面了解一下格式转换符与格式修饰符表示的意 ...
- Centos7.x 安装libevent2.x
1.在http://libevent.org/下载libevent-2.1.8-stable.tar.gz 2.tar -zxvf libevent-2.1.8-stable.tar.gz 3.cd ...