Why its not accepting spread properties ? I am using babel-preset-env for this.
.babelrc
The Object rest spread operator will probably be a future feature of an ECMAScript specification (it's in stage 3 for the moment).
For now, it can be supported thanks to Babel
but you have to use the transform-object-rest-spread plugin.
{
"presets": [
"react",
[
"env",
{
"targets": {},
"debug": true,
"modules": "commonjs"
}
],
"transform-object-rest-spread"
]
}