Summary
In this chapter, we have moved components into a shared library and used that library with both our Blazor Server and Blazor WebAssembly projects.
Using shared libraries like this is the way to create shared libraries (for others to use) and it is also a great way to structure our in-house projects (so that it is easy to change from Blazor Server to Blazor WebAssembly, or the other way around). If you have a site already, you can build your Blazor components in a shared library, as we did in the chapter.
By using components as part of your existing site (using Blazor Server), you can get started with Blazor bit by bit until you have converted the whole thing. When that is done, you can decide whether or not to keep using Blazor Server (as I mentioned, we use Blazor Server at work) or move to Blazor WebAssembly.
We also learned how we can use dependency injection to use different ways of accessing data depending on the platform. And last but not least, we talked about...