2

Redux function:

  function setAllVideos(state, action) {
    return tassign(state, { allVideos: state.allVideos.join([action.data]) });}

Declaration + State:

allVideos: Array<Object>; 

AND

allVideos: [],

I just can't seem to get the syntax right on joining these together.

SebastianG
  • 8,563
  • 8
  • 47
  • 111

1 Answers1

1

Correct should be

 return tassign(state, { allVideos: state.allVideos.concat(action.data) });
Adrian Pirvulescu
  • 4,308
  • 3
  • 30
  • 47