Found on redux from website the following example:
render() {
return (
<div>
<Field name="myField" component={props =>
<MyStrangeInput
currentValue={{val: props.value}}
thingsChanged={param => props.onChange(param.val)}/>
}/>
</div>
);
}
I understand that we pass MyStangeInput 2 arguments to the component, currentValue and thingsChanged.
currentValue been used and "value" and thingsChanged used as a method for "onChange"
I would love the get explanation regarding the following syntax:
{{ val: props.value}} - is it passing an object?
and
{param => props.onChange(param.val)} is it creating "param" arrow function?
it's a little bit confusing