Having tslint warnings (ES6) and still having some difficulty with its syntax.I am not sure how to convert to arrow functions.
[Image show the occurred warning][1]: https://i.sstatic.net/QCY69.png
var options = this.state.ProjectsArray.map(function (item, i) {
var Trmp = item["ID"] + ";#" + item["Title"];
return <option value={Trmp} key={item["ID"]}>{item["Title"]}</option> ;
});
Like this
var options = this.state.ProjectsArray.map((item, i) => {
var Trmp = item["ID"] + ";#" + item["Title"];
return <option value={Trmp} key={item["ID"]}>{item["Title"]}</option> ;
});
Remove function word and put => after the parameters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With