Reuse UI with Razor Class Libraries (RCL) in ASP.NET Core

Developers always look for ways to reuse their code and markup. ASP.NET Core offers several ways to reuse code and markup within a project (partials, custom tag helpers, view components etc.). What if you want to reuse a piece of user interface (UI) across multiple web applications? Luckily, ASP.NET Core 2.1 introduced what is known as Razor Class Library (RCL) projects that can be used to accomplish this task.