Redux News Reader Project - some advice

This is a short list of pointers related to this project:

While I’m not going to give any specific solutions, I thought that the challenges I had of completing this project were beyond the scope of what the course is trying to teach, and therefore not quite instructive, at least in terms pertaining the subject of this course.

Firstly, there are a few hindering bugs, at least in the version I completed 5/8/2021. These could possibly be intentional (debugging is a crucial skill after all), but I found them frustrating enough to want to at least point others in their direction.

  1. Carefully inspect the code for the loadCommentsForArticleId async thunk creator. For some reason, the code for the first few tasks of this project were pre-completed for me and there were two things I had to fix to make this function behave as expected. You’ll need to add one thing, and change one thing (again, at least as it was pre-written for me).

  2. As is, the POST request to the articles API does not return a ‘proper’ comment response. I’ll leave the debugging to you, but remember that the project uses a Mock Service Worker, and you therefore have access to its logic in the project files. Dig around; one small edit to a single file will ‘fix’ the API.

Secondly, I think a lot of the challenge of this particular project (outside of the aforementioned bugs) involves the extraReducers object of the createSlice() options object in commentSlice.js so remember you have console.log() (the output of which is viewable in your browser’s devtools) and Redux devtools at your disposal (VERY helpful for viewing the structure of and changes to state).

I hope this is a little helpful!


Thanks for the heads up! I’m not up to that project yet, but will likely be working on it next week. This advice will no doubt save me a few headaches - sorry you had to go through the frustration first.

Having read through the forums, I know I’m far from the only one who found this project quite challenging. And I’m always happy to help where I can. If you have trouble with the project when you get to it, feel free to reach out.

1 Like

This was so helpful, thank you! Mine came with the first few steps filled in as well and your suggestions were a life-saver!

Happy it helped! I trying to leave some of the challenge :nerd_face: