React
CSDN_Alisa
先定个小目标,期待粉丝破50。自己写的文章,自己也会看,欢迎大家随时指教。
展开
-
react 报错0.chunk.js:449884 Warning: Can‘t perform a React state update on an unmounted component. Thi
0.chunk.js:449884 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.原因:se原创 2020-07-17 13:47:10 · 498 阅读 · 0 评论 -
react 报错 Each child in an array or iterator should have a unique "key" prop.
报错描述:Each child in an array or iterator should have a unique "key" prop.解决办法:找到对应的js第39行,为div加上key属性。循环的时候加个key={i} 虽然并没啥用,但是必须加噢~~...原创 2020-03-25 23:56:33 · 240 阅读 · 0 评论 -
react 微信公众号缓存问题详细解决
缓存问题,没有什么好的解决方案,只能一步一步优化。1,入口文件 meta优化<meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache">...原创 2020-03-26 10:16:41 · 900 阅读 · 0 评论 -
react 解决数据库存储时间差八小时
1、问题使用moment.js格式化本地时间戳时多出了8小时问题,这8小时是本地时间与格林威治标准时间(GMT)的时差*例如:moment(5*60*1000),将5分钟的本地时间戳转为日期,结果会多出8小时,就是解决此问题。2、解决方案fixTimezoneOffset = () => { const date = new Da...原创 2020-01-17 11:28:28 · 1223 阅读 · 0 评论 -
react 实用型弹出提示框(移动端)
第一种方法:1、先imort antd-mobile中的Modal方法,调用Modal方法中的alert属性。import {Modal} from 'antd-mobile';const alert = Modal.alert;2、先定义弹出框的文字内容,alert有三个属性()3、展示效果...原创 2020-01-17 11:02:29 · 2662 阅读 · 0 评论 -
ant design pro 1
1、组件化界面component 组件里都会有一个index文件,用于导出各个组件,然后去写模块。并为每一个模块再写一个index文件。原创 2019-11-13 09:32:47 · 119 阅读 · 0 评论 -
ReactDom is not defined
原创 2019-11-01 19:05:08 · 9137 阅读 · 0 评论