Notes

Object.assign() vs Object spread operator

Edit on GitHub

Redux

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.

1npm i -D babel-plugin-syntax-object-rest-spread babel-plugin-transform-object-rest-spread

once installed, add the plugins to .babelrc

1"plugins": [
2	"syntax-object-rest-spread",
3  	"transform-object-rest-spread"
4  ]