title: Clearing an array state in Redux
body: <p>How do I clear an array state in Redux? I have an initial state of an empty array, and things are being added. I want to have an action that just clear it, I tried the following method but it gives me "Unexpected token" error about the "action.payload" I give to the CLEAR_THINGS action:</p>
  
  <pre><code>export default (state=[], action) =&gt; {
  switch (action.type) {
      case "RECEIVE_THING":
          return [
              ...state,
              action.payload
          ];
      case "CLEAR_THINGS":
          return {
              ...state,
              action.payload // payload here is []...
          };
      default:
          return state;
  }}
  </code></pre>
  
  <p>It also throw the error  if I just use [] instead of through action.payload.</p>