I guess the answer to this question is that in the first expression (0,_utils.getDefaultFormState)
the comma ,
operator evaluates to the last argument and returns it.
So, comma operator operates on it's operands from left to right and returns the last right most evaluated operand in the expression.
But that is different in terms of using functions and its returned values.
// sample from MDN.
function myFunc() {
var x = 0;
return (x += 1, x); // the same as return ++x;
}
As i mentioned in the comment:
First brackets are self executing function and it returns it's value as a function of _utils
object, which accepts 3 or more arguments.
()
returns a function which accepts 3 arguments.(n0, n1, ..., n)
evaluates ton
, so in your case, the function_utils.getDefaultFormState
. As for why this is used, I'm not sure