我已经在代码库中编写了这段代码,但是我无法理解它的工作原理。
// this method of writing ((value) after arrow
dataOnChange = (index) => ((value) => {
let dataoptions = this.state.options.map((item, itemIndex) => {
if(itemIndex === index) {
return value;
}
return item;
});
// setting the state here with dataoptions which is not at all a concren
});