Complement response
0xD34F - it is impossible to name properties to specify that point.
return { ...state nazvaniya:{ title:action.title } }
where is nazvaniya must be a string! If you want it to be a computed expression, you need to add (as it was already said) brackets, ie:
return { ...state [action.title]:{ title:action.title } }
But I think 99% you want something, because if you get that state title will be installed in the field with the same name, which will come into action.title, for example:
return { ...state dollar:{ title: "dollar" // suppose that in action.title string "dollar" } }
To understand
the theory.
p.s. tag "functional programming" here looks too dangerous)