Loop in react-native

前端 未结 6 1641
慢半拍i
慢半拍i 2021-02-04 23:57

I want to make a list of fields depending on the number of the player that user has selected. I wanted to make something like this:

generatePaymentField() {
             


        
6条回答
  •  野的像风
    2021-02-05 00:53

    renderItem(item)
      {
        const width = '80%';
        var items = [];
    
        for(let i = 0; i < item.count; i++){
    
            items.push( 
        
          {item.title}
          {item.taskDataElements[0].description + " "}
          BEGIN
        
    
        {this.msToTime(item.minTatTimestamp) <= 0 ? "NOW" : this.msToTime(item.minTatTimestamp) + "hrs"}
       )
      }
    
      return items;
    }
    
    render() {
    return (this.renderItem(this.props.item)) 
    }
    

提交回复
热议问题