Add persistence to local storage for an existing app
Here's a simple shopping list app - https://codesandbox.io/p/sandbox/shopping-list-local-storage-76f46c. Right now if the user refreshes the page, all the data is lost.
Improve the app by saving the data to local storage, so the user doesn't lose his items.
Acceptance criteria:
- When the user changes the items in the shopping list, the list is updated in local storage as well
- When the user refreshes the page, the items are still there
Notes:
- the app doesn't need to work across multiple tabs (but you can give it a shot if you want!)
- you don't need to create a custom hook (but you can try this other practice exercise if you want to try that)
When you’re ready to check your work, take a look at the solution for this exercise.
Member discussion