Search code examples
blazorblazor-webassemblymauimaui-blazorblazor-hybrid

Wrap an existing Blazor Web Assembly app into a .NET MAUI Hybrid App


I watched this tutorial on how to create a .NET MAUI Blazor App

https://www.youtube.com/watch?v=bnoCU5XGBh4

However I have an existing Blazor Web Assembly app, what is the best recommended way to wrap it into a BlazorWebView? I have dug around for tutorials but as its fairly new there is not much content.


Solution

  • Steps:

    1. Create a web assembly app
    2. Move the pages/components to common razor class library
    3. Create MAUI Blazor Hybrid Project
    4. Reuse the common razor class library in MAUI and Blazor.

    Checkout the sample repo