
react
文章平均质量分 63
qq_35577652
这个作者很懒,什么都没留下…
展开
-
react中function()报错?
例如: rearrange:function(centerIndex ) {} 报错的原因是es6创建extends React.Component 时变了点东西要去掉:function 也就是-->rearrange ( centerIndex ) {}再例如:getInitialState(){ return { isEditing: false原创 2017-04-04 14:10:30 · 1123 阅读 · 0 评论 -
react中console.log(this),this为空?
默认看这个内容的都是young nooob,很有可能是因为您没有 构造方法class ImgFigure extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } /* *imgFigure的點擊處原创 2017-04-04 23:18:36 · 1174 阅读 · 0 评论