Does anyone know what this line of Javascript code is doing in React?
Advertisements Does anyone what the code inside the onChange is doing? I understand that …textData is the spread operator, but why is it spreaded inside of a { } and what is [e.target.name]: e.target.value doing, is this a new javascript syntax? Sorry for noob question! setTextData({ …textData, [e.target.name]: e.target.value }) The rest of the file… Read More Does anyone know what this line of Javascript code is doing in React?