title: What does ...state do exactly?
body: <p>I'm trying out NgRx (redux) in Angular and the <code>...state</code> in the example below, I can not fully understand. I searched for it and generally understood it as spread, but not sure why the data attributes in the <code>Interface State</code> are repeated in the <code>return{}</code> block of the reducer's <code>switch</code>, as the ... would <em>spread</em> them anyway? Can anyone help me understand this please?</p>
  
  <pre><code>export interface State {
    sessionData: Map&lt;string, string&gt;;
    requesting: boolean;
    hasError: boolean;
    status: StatusModel;
  }
  
  export function sessionReducer(state: State = INITIAL_STATE, action: Session.Actions): State {
        switch (action.type) {
          case Session.REQUEST_SESSION_DATA:
            return {
              ...state,
              requesting: true,
              hasError: false,
              status: undefined,
            };
        }
  }
  </code></pre>
  
  <p>PS: I've looked at the thread <a href="https://stackoverflow.com/questions/31048953/what-do-these-three-dots-in-react-do">here</a> and generally get that spread does exactly that, spread out. But here in the context of Redux/NgRx, trying to understand why the <code>return{}</code> has <code>...state</code> and the three additional properties.</p>