Sharing Code and Resources
Throughout the book, we have been building Blazor Server and Blazor WebAssembly side by side. This is a great way to build our projects if we want to switch technologies further down the road or, as we do at work, share components between the customer portal and our internal CRM system.
Most of us will probably have one hosting model that we are working with, not usually two, but building it this way does have some perks.
Always think about if there might be a sharable part of the component we are building; that way, we can reuse it, and if we add something to the component, we get that benefit for all our components.
But it’s not only about sharing components inside our own projects. What if we want to create a library that can be shared with other departments, or even an open-source project sharing components with the world?
In this chapter, we will look at some of the things we already use when sharing components, and also at sharing...