Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when refreshing the cart page #4

Open
dipranjans opened this issue Apr 7, 2020 · 1 comment
Open

Issue when refreshing the cart page #4

dipranjans opened this issue Apr 7, 2020 · 1 comment

Comments

@dipranjans
Copy link

Hi, how to resolve the data lost when refresh the cart page?

What's the best way to handle this?

@rAndrade360
Copy link

You can do a trick with react's localStorage and save the cart to the customer's browser. So, when you restart the component, you would look for this information in localStorage.

The other way is using redux and redux-persist. It automates the persistence process, saving the information in the best way in the user's browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants