这个报错在以下情形会出现

第一种

<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的更多相关文章

  1. (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 ...

  2. ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE

    ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE 打开 /app/base/lib/application/dbtable.php , 替换A ...

  3. Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work.

    问题:创建容器的时候报错WARNING: IPv4 forwarding is disabled. Networking will not work. # docker run -it -p 3000 ...

  4. 【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.”在命令行使用密码不安全警 ...

  5. scp执行报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

    linux环境执行scp时会遇到报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!,如下 [root@subsname home]# scp AAA. ...

  6. 关于报错:Warning: Cannot modify header information - headers already sent by (output started at

    8月5日,第一个项目即将完成,测试时,发现登录功能会出现小问题:记住密码的时候会报错 Warning: Cannot modify header information - headers alrea ...

  7. 支付宝支付php的demo或sdk报错 Warning: openssl_sign() [function.openssl-sign]: Unknown signature algorithm. in

    最近在做支付宝支付,在本地测试一切正常,上传到服务器就遇到报错: Warning: openssl_sign() [function.openssl-sign]: Unknown signature ...

  8. 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 ...

  9. PHP7.1 报错 Warning Illegal string offset

    报错如下: Warning: Illegal string offset '阿根廷' in F:\wnmp\www\test.php on line 24 Warning: Illegal strin ...

随机推荐

  1. Facebook libra开发者文档- 1 -welcome

    参考https://developers.libra.org/docs/welcome-to-libra 欢迎来到Libra开发者网站!Libra的使命是建立一个简单的全球货币和金融基础设施,为数十亿 ...

  2. ARM 之一 ELF文件、镜像(Image)文件、可执行文件、对象文件 详解

    [转]https://blog.csdn.net/ZCShouCSDN/article/details/100048461 ELF 文件规范   ELF(Executable and Linking ...

  3. osg fbx模型点击节点,对应节点染色

    class CPickHandler :public osgGA::GUIEventHandler { public: CPickHandler(osgViewer::Viewer *viewer) ...

  4. python数据可视化:pyecharts

    发现了一个做数据可视化非常好的库:pyecharts.非常便捷好用,大力推荐!! 官方介绍:pyecharts 是一个用于生成 Echarts 图表的类库.Echarts 是百度开源的一个数据可视化 ...

  5. DB2中的NVL和NVL2函数

    NVL函数是一个空值转换函数 NVL(表达式1,表达式2) 如果表达式1为空值,NVL返回值为表达式2的值,否则返回表达式1的值. 该函数的目的是把一个空值(null)转换成一个实际的值.其表达式的值 ...

  6. iOS-类似微信摇一摇

    首先,一直以为摇一摇的功能实现好高大上,结果百度了.我自己也模仿写了一个demo.主要代码如下: 新建一个项目,名字为AnimationShake. 主要代码: - (void)motionBegan ...

  7. 移动端自动化测试之adb常用命令

    今天我们来聊聊自动化测试过程中常用的adb命令. 简介 首先介绍下什么是adb,adb全称叫“android debug bridge”,翻译过来就叫调试桥,通过命令行指令,可让你与移动端设备进行相互 ...

  8. 什么是挂载(mount)?

    官方文档是这么解释的: All files accessible in a Unix system are arranged in one big tree, the file hierarchy, ...

  9. go json解析Marshal和Unmarshal

    Decoder: package main import ( "encoding/json" "fmt" "io" "log&qu ...

  10. BeginLinux Programming chapter16: X11桌面系统简介

    当前两个最流行的linux desktop environment: GNOME 和KDE, 两者对应的图形库分别是 GTK+ 和 QT. GNOME与KDE与X11的关系: X defines no ...