Angular 6 ngrx, how to add new item to array in state object? : <p>I have a simple situation, I have actions Like CreatUser, CreateSuccess, CreateFail. How should I add new object to array and when <code>Create</code> action is dispatched or <code>CreateSuccess</code>? And how should I do that?</p>

<pre><code>export function reducer(state = init, action: Actions): State {
switch (action.type) {
    case ActionsTypes.CREATE:
        return {
            ...state,
            inProgress: true
        };
    case ActionsTypes.CREATE_SUCCESS:
        return {
            ...state,
            users: state.users.push(action.payload),
            inProgress: false
        };
    case ActionsTypes.CREATE_FAIL:
        return {
            ...state,
            error: action.payload,
            inProgress: false
        };
    default:
        return state;
}
</code></pre>

<p>In code above I tried to add new user using push method, but it is not good solution. How should I do that?</p>
