Introducing Blazor WebAssembly ASP.NET Core Hosted
Throughout this book, we fully focused on the Blazor WebAssembly project; even when we introduced the API, I kept it away so you could just focus on what matters in Blazor WebAssembly within the browser.
What we have created during this book is called a Blazor WebAssembly standalone project, which means a project that serves itself and will be published without any server or backend to serve it.
.NET already offers an out-of-the-box template for a Blazor WebAssembly project called Blazor WebAssembly ASP.NET Core Hosted. This template creates a Blazor WebAssembly project, a shared class library project, and an ASP.NET Core API directly inside the solution. The most interesting part of this type of project is that the API project is responsible for serving the Blazor WebAssembly app to the client. In other words, you only need to host the server project and the Blazor WebAssembly project will be referenced inside it.
The Blazor...