title: ngrx store does not update subscription when object is updated
body: <p>Now I understand there are similar questions <a href="https://stackoverflow.com/questions/46098421/ngrx-store-subscription-not-called-when-state-changes">here</a> and <a href="https://stackoverflow.com/questions/50859058/ngrx-subscribed-store-does-not-update-on-state-change-angular5">here</a> but they've only given me half the answer, </p>
  
  <p>Basically what is happening is in my reducer file I have an update method like so</p>
  
  <pre><code>import * as UserActions from '../actions/user.actions';
  import { UserDto } from '@shared/service-proxies/service-proxies';
  
  export function userReducer(state: UserDto[] = null, action: 
  UserActions.Actions) {
    switch (action.type) {
      case UserActions.SET_USERS:
          return action.payload;
      case UserActions.UPDATE_USER:
          if (state === null) { state = []; }
          let index = state.findIndex(x =&gt; x.id === action.payload.id);
          if (index !== -1) {
              state[index] = action.payload;
          } else {
              state.push(action.payload);
          }
          return state;
      default:
          return state;
    }
  }
  </code></pre>
  
  <p>now whats happening is update is being called, altering the state and returning the new state, but its not triggering my state subscription, now from the other questions I can gather this is because 'technically' its the same state object, just with certain objects changed, how In this circumstance can I trigger my subscription?? </p>
  
  <p>I tried to create a new variable like so and then return that but it still thinks its the same object</p>
  
  <pre><code>let newState = state;
  return state
  </code></pre>
  
  <p>what would be the best solution here??</p>