javascript-ru / angular-screencast

1 stars 0 forks source link

[ngrx] Redux basics #8

Open stevermeister opened 5 years ago

stevermeister commented 5 years ago
Store {
  state

  private reducer(state, action) {
    switch(action) {

        return state.copy();

    }
  }

  dispatch(action) {
     return reducer(state, action)
  }
}

action: {type: string, payload: any}
constantant commented 5 years ago

Would be great to get full understanding of pros and cons of the approach