react报错以及解决方案

报错: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;之前

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容