React Native Checkbox In A Loop

[Solved] React Native Checkbox In A Loop | Swift - Code Explorer | yomemimo.com
Question : react-native-checkbox in a loop

Answered by : mukash-wasti

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}); } }
/>

Source : https://stackoverflow.com/questions/62955622/how-to-handle-checkbox-in-loop-react-native | Last Update : Mon, 27 Sep 21

Answers related to react native checkbox in a loop

Code Explorer Popular Question For Swift