While reading through the docs of MUI , I encountered with a new syntax of the arrow function in js and I didn't see it anywhere. I tried to understand it's working and I can't find it anywhere.
The syntax is followed by
const handleChange = (prop) => (event) => {
setValues({ ...values, [prop]: event.target.value });
};
and it passes to the onChange event like this
<EmailText
label="Email"
type={"email"}
onChange={handleChange("email")}
/>
How does this function work and what is the meaning of this function and how did the onChange pass the event parameter to the function?