Closed lwinch2006 closed 1 year ago
In usual Blazor WASM app all works OK
Can you provide me with a repro?
Hello. I have created a sample MAUI + Blazor + Fluxor project. It is just a sample app generated from Microsoft template with Counter page. With Fluxor I created sample IncrementCountAction that should lead to calling ReduceIncrementCountAction, but it is not. Incrementing count with local function works normally. Tested for Mac Catalyst, iOS and Android platforms
Link to repo: https://github.com/lwinch2006/TestBlazorMauiWithFluxor
Interface:
Have you added a <StoreInitializer>
component somewhere, such as Main.razor
?
Oh my bad 😰, nope, the most embarrassing that I added it in WASM app but not added in MAUI app. After this was surprised that all looks good in one app and not working in another. Everything works great now, sorry for bothering.
It's not a bother at all. This step is so infrequent it is easily forgotten :)
I'm testing Fluxor with Blazor Hybrid app. And it looks like methods decorated with [ReducerMethod] attribute is not being called.
Setup in MauiProgram.cs
Defined action
Defined reducer
Calling from Razor component
So console prints out
BEFORE ACTION CALLED
ANDACTION CREATED
, but notACTION PROCESSED
. So I'm concluding that ReducerMethod not being called.