Mosh Redux part 7 (Consuming APIs)

In the Ultimate Redux Source code, go into bugs-backend project.
Install by typing npm i
then npm start

Now a node server should be running at localhost:9001

The approach

reducer should not make any outside manipulations, like DOM or calling APIS. It get current state, an d return new state. It should be pure.

Hence in our actionCreator, we can encapsulate code with side effects.

However, whenever we get data, we always call this actionCreator. It can get repetitive.

Middlware