9
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 ...
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.