This little demo is based on a Gist written by Steve Sanderson where he shows how to persist state in the browser using sessionStorage. His demo shows how to persist the counter value but I wanted to try something a bit more real-world, a very simple shopping cart, and also to use localStorage rather than sessionStorage. You can download the project here.
- This is a .NET Core 3.1 framework will not work with .NET 5.0
Blazored.LocalStorage package instead for .NET 5.0