06 December 2016

As usual, I didn’t get it… (it was sent this summer!)

(dramatic theme music, coming to a theater near you) THE SPREAD OPERATOR

https://rainsoft.io/how-three-dots-changed-javascript/

The comments were helpful so I know I’m not crazy (caution about making it hard to reason about the code vs this is really cool to have built-in)

It is an ES7 feature, so don’t forget to: npm install –save babel-plugin-transform-object-rest-spread

and add transform-object-rest-spread to the .babelrc plugins

or use the babel-preset-stage-2 / stage2 preset



blog comments powered by Disqus