![](https://img-blog.csdnimg.cn/20210518165335504.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
react
react
一年两个
当我发现自己是喜欢你的时候,我已回不了头。
展开
-
已解决:Component should be written as a pure functioneslintreact/prefer-stateless-fun报错
已解决 Component should be written as a pure functioneslintreact/prefer-stateless-funComponent should be written as a pure functioneslintreact/prefer-stateless-fun解决方案:在class组件中添加state,即可constructor(props) {super(props)this.state = {}}...原创 2020-10-28 11:08:03 · 2196 阅读 · 0 评论 -
antd pro react项目 umi dev 修改默认端口号方法
antd pro react项目 umi dev 修改默认端口号方法"start": "set PORT=2020 && umi dev",原创 2020-11-14 14:24:14 · 1440 阅读 · 0 评论 -
在react中使用chartjs出现的错误:”devScripts.js:5836 Warning: Failed prop type: Invalid prop `height` of type“
Failed prop type: Invalid prop height of type翻译的意思就是 height 属性输入的类型是无效的。什么意思呢?简单来讲就是 height 属性值输入的类型错误,你需要检查一下,此处的数据类型是是什么,而你又写了什么。转入详情,错误如下: <div style={{ height: '100%', width: '100%' }}> {/* 这里的 height 的属性值是 string类型,而实际上他需要 number类型 */}原创 2020-10-30 14:39:16 · 3071 阅读 · 0 评论