Okay, so I found the answer to my own question. But before diving into the solution, I want to share a bit about how I implemented Fluxor in my project.
According to the Fluxor documentation, Fluxor is typically registered like this:
var currentAssembly = typeof(Program).Assembly;
builder.Services.AddFluxor(options => options.ScanAssemblies(currentAssembly));
In my implementation, I wanted to abstract my ApplicationState behind an interface (IApplicationState). So I did the following:
builder.Services
.AddFluxor(o =>
{
o.ScanAssemblies(
typeof(IApplicationState).Assembly,
typeof(ApplicationState).Assembly
);
})
.AddSingleton<IApplicationState>(sp => sp.GetRequiredService<ApplicationState>());
Notice that I'm using IApplicationState instead of referencing ApplicationState directly in my components or other services.
This setup works perfectly fine in Blazor WebAssembly. However, for some reason (which I still haven't fully figured out), MAUI Blazor Hybrid doesn't play well with this pattern.
When I removed the interface and registered the state directly like this:
builder.Services
.AddFluxor(o =>
{
o.ScanAssemblies(
typeof(ApplicationState).Assembly
);
});
…it started working correctly in MAUI Blazor Hybrid.
So in short: using an interface for your state class seems to cause issues in MAUI Blazor Hybrid, even though it works fine in Blazor WASM.