在render内部进行几次迭代后,这是未定义的

时间:2017-06-19 17:10:14

标签: reactjs redux react-redux

状态有一个数组系列,并使用render里面的map。经过几次迭代后,此对象的局部范围显示未定义,但闭包(渲染)显示此对象的内容。可能是什么原因?



render () {
     console.log("funding rounds",this)
     return (
       <div>
           {this.state.series
           ?
             this.state.series.map(item, index => {
               return(
                 <Series showEdit={item.showEdit?item.showEdit:false} data={item} index={index} accessor={this.props.accessor} isLocked={item.is_locked} params={this.props.params}/>
             )
           })
          :null
         }
       </div>
     );
   }
&#13;
  
&#13;
&#13;
&#13;

0 个答案:

没有答案
相关问题