This adds redux to the app, replace our own built in state module. I have manually tested a number of things and have ensured the current test work. With that said, I recommend you verify this too.
Why redux:
Given that we are using immer and a single reducer, Redux provides us the same functionality, but with significantly better dev tools to watch state.
In the longterm, we should start using middleware to perform requests, which will help simplify the flow significantly, and allow us to better track where and when requests are being made. One of the cool things about Redux Tool Kit (which is what I am using) is that it provides something calls RTKQuery. This will allow us to handle loading states and such for requests a lot easier, and not have to create different actions to do so.
This adds redux to the app, replace our own built in state module. I have manually tested a number of things and have ensured the current test work. With that said, I recommend you verify this too.
This is all following the quick start guide: https://redux-toolkit.js.org/tutorials/quick-start
Why redux: Given that we are using immer and a single reducer, Redux provides us the same functionality, but with significantly better dev tools to watch state.
In the longterm, we should start using middleware to perform requests, which will help simplify the flow significantly, and allow us to better track where and when requests are being made. One of the cool things about Redux Tool Kit (which is what I am using) is that it provides something calls RTKQuery. This will allow us to handle loading states and such for requests a lot easier, and not have to create different actions to do so.
The app with Redux Dev Tools: