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)

Developer technologies .NET Blazor
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.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.