react native checkbox in a loop

Solutions on MaxInterview for react native checkbox in a loop by the best coders in the world

showing results for - "react native checkbox in a loop"
Lotta
06 Nov 2016
1this.state.allItems.map((res, index) => {
2 return(
3     <CheckBox 
4         color="green"
5         style={{ marginRight: 20, }}
6         checked={this.state.checked[index]}
7         onChange={()=> {
8                  let { checked } = this.state;
9                  checked[index] = !checked[index];
10                  this.setState({checked});
11         }
12 }
13/>
14
similar questions
queries leading to this page
react native checkbox in a loop