I\'m looking for a pure function, to modify my immutable state object. The original state given as parameter must stay untouched. This is especially useful when working with fra
An ES6 solution, that has a bit more support is Object.assign:
const updateState = (state, item) => Object.assign({}, state, { [item.id]: item });