Preview:
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)}
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