3
Managing State – Part 1
In this chapter, we will start looking at managing state. There is also a continuation of this chapter in Chapter 11, Managing State – Part 2.
There are many different ways of managing state or persisting data. Since this book focuses on Blazor, we will not explore how to connect to databases but create a simple JSON storage instead.
In the repo on GitHub, you can find more examples of storing data in databases such as RavenDB or MSSQL.
We will use a common pattern called the repository pattern.
We will also create an API to access the data from the JSON repository.
By the end of this chapter, we will have learned how to create a JSON repository and an API.
We will cover the following main topics:
- Creating a data project ...
Get Web Development with Blazor - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.