Dreamescaper / BlazorBindings.Maui

MAUI Blazor Bindings - Build native and hybrid MAUI apps with Blazor
MIT License
242 stars 16 forks source link

Allow to replace root component #103

Closed Dreamescaper closed 1 year ago

Dreamescaper commented 1 year ago
@if(_someCondition)
{
   <MainPage1 />
}
else
{
   <MainPage2 />
}

Currently the component above does not make much sense - the Renderer wouldn't replace the page is has set before. It seems like an edge case, but it blocks the case with setting a global ErrorBoundary (which would replace the MainPage with some error page).

It should be supported for both MainPage and Navigation cases.

Dreamescaper commented 1 year ago

POC here: support_replacing_root_elements