Answers for "react-native-checkbox in a loop"

0

react-native-checkbox in a loop

this.state.allItems.map((res, index) => {
 return(
     <CheckBox 
         color="green"
         style={{ marginRight: 20, }}
         checked={this.state.checked[index]}
         onChange={()=> {
                  let { checked } = this.state;
                  checked[index] = !checked[index];
                  this.setState({checked});
         }
 }
/>
Posted by: Guest on September-20-2021

Code answers related to "react-native-checkbox in a loop"

Code answers related to "Javascript"

Browse Popular Code Answers by Language