欢迎光临我的博客,我是努力挣钱的小鑫!|

努力挣钱的小鑫

园龄:4年11个月粉丝:36关注:8

【React】react:Matched leaf route at location "/" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page. 报错问题

问题原因

image

Matched leaf route at location "/" does not have an element. This means it will render an with a null value by default resulting in an "empty" page.
位置“/”匹配的叶路由没有元素。这意味着它将渲染<Outlet />默认值为空会导致“空”页。

应该是最新 raect-router-dom 改变了书写方式,我看的是去年的教程视频,所以导致写法过时报警告了。

解决方式

image

posted @   努力挣钱的小鑫  阅读(3161)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起