What's more efficient in Blazor hiding content by changing css or by actually changing the content.
CSS:
<div class="@ProfileCssClass">Some content</div>
C# IF:
@if (IsProfileVisible)
{
<div>Some content</div>
}
Assume that ProfileCssClass is a class that shows/hides using display:none and that is IsProfileVisible is a bool. Both are updated via an @onclick.
Let's assume that in this example, the div being displayed is not trivial (bigger web socket payload?) and that the content is pre-generated and already on the page (vs. going and getting the data when it's needed).
What's more efficient, just hiding and showing by changing a single class or reloading the contents of the div. I guess what I am not clear on is what changing the class on a div actually changes in Blazor world - a small 16 character diff or something else.