Skip to content
Advertisement

React Redux, trying to add products to cart

I am trying to add products to shopping cart by storing them in local storage but, they are not getting stored. I looked into Redux-dev-tools and found out my state is not updating: enter image description here

As you can see action is getting fired but my state is not updating: enter image description here

Here is the source code:

cartAction.js

JavaScript

cartReducer.js

JavaScript

store.js

JavaScript

CartScreen.js

JavaScript

Advertisement

Answer

You need to fix this on CartReducer.js

JavaScript

to

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement