Redux News Reader

Hello, I know that many people get stuck while doing this project and I want to share my solution and I hope that this will help you to understand what could be wrong.

Thanks, I was stuck but your example helped me to get this right

    [loadCommentsForArticleId.fulfilled]: (state, action) => {
      state.isLoadingComments = false;
      state.failedToLoadComments = false;
      // add the fetched comments
      // should look like this { 123: ['Great article!' , 'I disagree.'] }
      state.byArticleId = {
          [action.payload.articleId]: action.payload.comments