Skip to content

Commit

Permalink
Sample field naming
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Sep 15, 2024
1 parent e419c0c commit 62ab1df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

<small style="margin-top:1rem;">@InfoText</small>
<small style="margin-top:1rem;">@_infoText</small>

<small style="margin-top:1rem;">@Description</small>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public partial class Counter : PersistentComponentBase
private int _count = 0;

[ComponentState]
private string InfoText = string.Empty;
private string _infoText = string.Empty;

protected override async Task InitializeStateAsync()
{
await Task.Delay(100); // simulate loading data

InfoText = $"State initialized in render mode: {RendererInfo.Name}";
_infoText = $"State initialized in render mode: {RendererInfo.Name}";
}

private void IncrementCount(object? state)
Expand Down

0 comments on commit 62ab1df

Please sign in to comment.