title: How do I use ES6 ... notation?
body: <p>I'm fairly new to react and es6 syntax. I am using redux for my react web app, and in my reducer I'd like to be able to push strings into my <code>state.likes</code> </p>
  
  <p>Here is my code:</p>
  
  <pre><code>const i = action.index;
  console.log(state);
  return [
      ...state.slice(0, i), // before the one we are updating
      {...state[i], likes: state[i].likes+1}, //i want to change this bit so I can push deviceKey
      ...state.slice(i+1), //after one we are updating
    ]
  </code></pre>
  
  <p>When I <code>console.log(state)</code> I have two objects in an array like this: </p>
  
  <pre><code>[
  {
    "code": "AAAAAAA",
    "caption": "blah blah blah",
    "likes": [
      "ABCDEFG",
      "BACDEFG"
    ],
    "id": "1234567890",
    "display_src": "https://pbs.twimg.com/profile_images/1044686525/Get_Some.jpg"
  },
  {
    "code": "BBBBBBB",
    "caption": "nah fam",
    "likes": [
      "ABCDEFG",
      "BACDEFG",
      "CBADEFG"
    ],
    "id": "0987654321",
    "display_src": 'http://got-crossfit.com/wp-content/uploads/2014/04/get-some-rest.jpg'
  }
  ]
  </code></pre>
  
  <p>Now, how would I push <code>action.deviceKey</code> into <code>state[i].likes</code> whenever this reducer fires? I tried <code>{...state[i], likes: state[i].likes.push(action.deviceKey)}</code>, but it didn't work.</p>
  
  <p>Also could someone eli5 what the ... notation does? I still don't really understand what the point of that is.</p>
  
  <p>Thanks!</p>