MauiReactor.CanvasKit is MauiReactor plugin that let you author custom controls using drawing commands in a declarative approach (similar to react-native-skia).
$ dotnet add package Reactor.Maui.CanvasMauiReactor is .NET library written on top of .NET MAUI that allows you to write applications in pure C# using an MVU approach.
This is the classic Counter app in MauiReactor:
class CounterPageState
{
public int Counter { get; set; }
}
class CounterPage : Component<CounterPageState>
{
public override VisualNode Render()
=> ContentPage("Counter Sample",
VStack(
Label($"Counter: {State.Counter}"),
Button("Click To Increment", () =>
SetState(s => s.Counter++))
)
.Spacing(10)
.Center()
);
}
dotnet new install Reactor.Maui.TemplatePack
dotnet tool install -g Reactor.Maui.HotReloadConsole
If you already installed an old version of Reactor.Maui.HotReload, you can update it to the latest using this command (NOTE: this has changed from version 3 to version 4):
dotnet tool update -g Reactor.Maui.HotReloadConsole
dotnet new maui-reactor-startup -o my-new-project
and move inside the new project folder
cd .\my-new-project\
dotnet build -t:Run -f net10.0-android
Under Mac, to target an iOS device/emulator, issue a command like this:
dotnet build -t:Run /p:_DeviceName=:v2:udid=<device_id> -f net10.0-ios
where the device id comes from this list:
xcrun simctl list
dotnet-maui-reactor -f [net10.0-android|net10.0-ios|...]