const inputChangeHandler = (e, id) => { let result = data.map((data, id) =>{ return data.id == id ? {...data, name:e.target.value} : {...data} }) setdata(result) } //then onChange={(e) =>inputChangeHandler(e, data.id)}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter