Using Object Spread Operator

    While effective, using can quickly make simple reducers difficult to read given its rather verbose syntax.

    The advantage of using the object spread syntax becomes more apparent when you're composing complex objects. Below getAddedIds maps an array of id values to an array of objects with values returned from and getQuantity.

    While the object spread syntax is a Stage 4 proposal for ECMAScript and accepted for the 2018 specification release, you will still need to use a transpiler such as to use it in production systems. You should use the env preset, install and add it individually to the array in your .babelrc.