Adding the Store Page
Explore how to add a Store page component in a Blazor WebAssembly app to display products and enable adding or deleting items from a shopping cart. Understand how to test the store page and recognize state loss when navigating. Gain insights into preserving application state using the AppState pattern for a persistent shopping cart experience.
We'll cover the following...
We'll cover the following...
To add a store, we need to add a Store component to our web app. We do this as follows:
- Open the
Shared\NavMenu.razorpage. - Add the following markup before the closing
ultag:
The preceding markup adds a menu option for the “Store” page.
-
Right-click the
Pagesfolder and select the “Add, Razor Component” option from the menu. -
Name the new component
Store. ...