adospace/reactorui-maui

Is it possible to use the HotReload Pipeline for conventional C# Markup based maui projects on Mac?

Closed this issue · 3 comments

Ciao Ado, really nice work here, bellissimo! Issue is I have an extensive project already built out utilizing C# Markup & moving solely to your project doesn't make sense yet. Love the HotReload...would it be possible to use it on Mac to reload/rerender conventional Maui ContentPages? How about running both side by side, lets say any new pages I add would be ReactorUI? Possible? Thanks, Serge.

Hi Serge, unfortunately, it is not possible to hot reload the conventional ContentPage: mainly because in a standard MVVM application UI (content page) is usually bound/linked to the State (ViewModel) while in an MVU app the UI part (the component) is weakly linked to the state (a POCO class) so when it's hot reloaded the component is updated with the new version and re-rendered while state is migrated from old version to new one.

Instead, you can "plugin" MauiReactor for new pages and, only for them, hot-reload will work on Mac (and on Windows).
You need to get a look at the ComponentHost class provided by MauiReactor. It serves to "host" MauiReactor components in MAUI applications.
You can also plug MauiReactor components in a Shell hosted application.

Please get a look at this documentation page:
https://adospace.gitbook.io/mauireactor/components/xaml-integration

Thanks Ado, I'll try the ComponentHost approach. Am I paying a large price in performance doing this?

nothing that I can envision, just pay attention to not mixing MVVM and MVU, just keep things well structured and separated