When returning an object from an arrow function, it seems that it is necessary to use an extra set of {} and a return keyword because of an ambigui
{}
return
You can always check this out for more custom solutions:
x => ({}[x.name] = x);