美文网首页
react报错以及解决方案

react报错以及解决方案

作者: 刘叶青 | 来源:发表于2019-12-30 15:08 被阅读0次

报错:react-dom.development.js:59 Uncaught Invariant Violation: Objects are not valid as a React child (found: Mon Sep 23 2019 14:37:24 GMT+0800 (中国标准时间)). If you meant to render a collection of children, use an array instead.
解决方案:react里不能使用对象,而new Date()是对象

报错:

Failed to compile

./src/Component/Home/Home.js

Line 4: Import in body of module; reorder to top import/first

Search for the keywords to learn more about each error.

This error occurred during the build time and cannot be dismissed.

解决方案:

原文链接:https://www.jianshu.com/p/fd766aa42891

把import '../../App.css';放在const { Header, Footer, Sider, Content } = Layout;之前

相关文章

网友评论

      本文标题:react报错以及解决方案

      本文链接:https://www.haomeiwen.com/subject/oulmoctx.html