I want to change the arrow style function (at onChange) in this react component into an ordinary function. I'm a beginner and for me it is helpful to see both versions side by side since I have a hard time getting the hang for the new arrow function syntax.
It should be possible but how would the could below look like using "ordinary" functions?
import React from "react";
function Input1(props) {
//console.log(props)
return (
<div>
<input
onChange={event => props.handleChange("email", event.target.value)}
/>
</div>
);
}
export default Input1;
function (event) { return props.handleChange("email", event.target.value); }?event => { /* multi-line of code here */ }would work.