renderRow index from each row in react native

Viewed 5600

I am trying to get the current index of renderRow but I dont seem to get it. I have also tried to add i in as a variable inside renderRow. I am making highscore and it would be super convenient if I could just get the number from renderRow itself. If there is another way to get the current number each time then it will also work.

          <ListView
          dataSource={this.state.dataSource}
          renderRow={(rowData, rowID ) =>
          <Text style={styles.topStyle}>{rowID}</Text>
          }
      />
1 Answers
Related