You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, I'm trying to modify my application store class starting from a PeriodicTimer in Blazor, then I call a service which makes the httpcalls and updates the store class (both the Synchronize method and the AppStore method that receives the new value in the state class are marked with the Action), however, the UI is not being updated.
My blazor component has the Observer attribute in place
[Action]
async Task HandleTimerAsync(PeriodicTimer timer, CancellationToken cancel = default)
{
try
{
while (await timer.WaitForNextTickAsync(cancel))
{
await synchronizer. Synchronize();
await InvokeAsync(() => StateHasChanged());
}
}
catch (Exception)
{
//Handle the exception but don't propagate it
}
}
Has anybody done something like this on a backgroundservice or timer?
Thanks in advance,
Geo
The text was updated successfully, but these errors were encountered:
Greetings, I'm trying to modify my application store class starting from a PeriodicTimer in Blazor, then I call a service which makes the httpcalls and updates the store class (both the Synchronize method and the AppStore method that receives the new value in the state class are marked with the Action), however, the UI is not being updated.
My blazor component has the Observer attribute in place
Has anybody done something like this on a backgroundservice or timer?
Thanks in advance,
Geo
The text was updated successfully, but these errors were encountered: