-
Book Overview & Buying
-
Table Of Contents
Web Development with Blazor - Fourth Edition
By :
In this chapter, we will start looking at managing state. There is also a continuation of this chapter in Chapter 13, Managing State – Part 2.
There are many ways to manage state or persist data. As soon as we leave a component, the state is gone. If we click the counter button and then navigate away, Blazor won't know how many times we clicked it, so we have to start over. You can't imagine how many times I have clicked that counter button over the years. It is such a simple yet powerful demo of Blazor and was a part of Steve's original demo back in 2017.
To get started quickly, I have split state management into two chapters. In this chapter, we focus on data access, and we will return to more state management in the second part. Since the previous edition, Aspire has become a really great way to set up a development environment, so it makes sense to use it in this new edition.
We will set up a PostgreSQL database and use Entity...