title: ERROR TypeError: Cannot delete property '1' of [object Array]
body: <p>I am working on the ngrx in angular 10 version<br>
  In Reducer, wanted to add action which will delete the user<br>
  while I tried the below code, getting an issue with it: <br>
  <strong>ERROR TypeError: Cannot delete property '1' of [object Array]</strong> <br>
  Not understanding this behaviour, as I just tried to remove an element from array by its position <br>
  I debug and seen that it is getting index of particular object in array<br>
  Getting error with <code>state.users.splice(indx, 1);</code></p>
  <pre><code>export interface State {
    users: IProduct[],
    error: string
  }
  
  export const initialState: State = {
    users: [],
    error: ''
  };
  
  export function reducer(state = initialState, action: UserActions): State {
    switch (action.type) {
  
      case UserActionTypes.DeleteUser:
        const indx = state.users.findIndex(user =&gt; user.id === action.payload.data.id);
        state.users.splice(indx, 1);
        return {
          ...state
        }
  
      case UserActionTypes.LoadUsers:
        return {
          ...state
        }
  
      case UserActionTypes.LoadUsersSuccess:
        return {
          ...state,
          users: [...state.users, ...action.payload.data],
          error: ''
        }
  
      case UserActionTypes.LoadUsersFailure:
        return {
          ...state,
          users: [],
          error: action.payload.error
        }
  
      default:
        return state;
    }
  }
  </code></pre>