Closed nkayilovette03 closed 3 years ago
hello there make sure you have set a default value for cart in Store.js like this: https://github.com/bradtraversy/proshop_mern/blob/master/frontend/src/store.js#L69 also in the cartReducer you have a default value in the function parameter like this: https://github.com/bradtraversy/proshop_mern/blob/master/frontend/src/reducers/cartReducers.js#L10
you can clone this repo and run it on your computer. It works.
https://github.com/bradtraversy/proshop_mern/
Then compare your code with this.
Unhandled Rejection (TypeError): can't access property "cartItems", getState().cart is undefined
This screen is visible only in development. It will not appear if the app crashes in production. Open your browser’s developer console to further inspect this error. Click the 'X' or hit ESC to dismiss this message.