Blazor server app does not redraw changed variable

Vladimir 1 Reputation point
2020-12-04T05:39:47.857+00:00

What is the minimum required to dynamically change the displayed element on the page (for example, the number of leading files counting on disk in the code section)what is the minimum required to dynamically change the displayed element on the page (for example, the number of leading files counting on disk in the code section)

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,374 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MisterMagoo 21 Reputation points
    2020-12-04T14:23:58.257+00:00

    After you set the new value to your variable, call

    InvokeAsync(StateHasChanged);
    

    This will request a re-render of the component.

    3 people found this answer helpful.