I have added a "logout" button that conditionally renders whenever a user is logged in to the app. The logout button makes use of the LogOut reducer and mutates the user state in addition to returning to the home page. Since only the user state is mutated, the cart state is left unchanged and the shopping cart items should persist.
I have added a "logout" button that conditionally renders whenever a user is logged in to the app. The logout button makes use of the LogOut reducer and mutates the user state in addition to returning to the home page. Since only the user state is mutated, the cart state is left unchanged and the shopping cart items should persist.