Object.assign() vs Object spread operator
Object.assign() vs Object spread operator
You can use ...state, action
instead of Object.assign({}, state, action)
Will need a separate Babel plugin to work.
npm i -D babel-plugin-syntax-object-rest-spread babel-plugin-transform-object-rest-spread
once installed, add the plugins to .babelrc
"plugins": [
"syntax-object-rest-spread",
"transform-object-rest-spread"
]