I made a Simple WebApp in React.js, that can add food to a cart and see it or finally order it. when I add food, my cart updates and can see data but when I refresh the page, data will be gone how can save data and when I refresh the page still can see it.
You have different solutions to store your data:
If you need to save the state of your shopping cart somewhere you can do that server side. You can store it in Session state. When you refresh you refill the page from Session state.