I am trying to get the spread operator to work

import React from 'react';

export class Hello extends React.Component {
  render(){
    const array = [1,2,3,4,5,6,7,8,9,10];
    return (
      <div className="hello">
        Hello World!
        {...array}
      </div>
    );
  }
}

module.exports = {
  entry: './src/js/main.js',
  output: {
    path: 'build',
    filename: 'bundle.js'
  },
  devServer: {
    inline: true,
    contentBase: './build',
    port: 3000
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /(node_modules)/,
        loader: 'babel',
        query: {
          presets: ['es2015', 'react', 'stage-0']
        }
      },
      {
        test: /\.scss$/,
        loader: 'style-loader!css-loader!postcss-loader!sass-loader'
      }
    ]
  }
}

I just wanted to ask if anyone has a working set up for webpack that transpiles the spread operator. I have tried stage-0, stage-2, and stage-3 and have also tried the rest operator plugins and nothing is doing it for me. I put the component just in case there is a mistake in there but when i remove {…array} everything works. Can anyone clear this up on how to get these features working? thanks!

THe correct syntax would be ‘[…array]’.

So what i wanted to do was display the contents of the array.
I used {[…array]}

Thanks a lot PortableStick lol