Skip to content

Commit 5e99ac4

Browse files
committed
Updates
1 parent 41ef8b8 commit 5e99ac4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aspnetcore/diagnostics/bl0007.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ A [component parameter](xref:blazor/components/index#component-parameters), whic
2121

2222
## Rule description
2323

24-
A component parameter is a framework-managed communication channel between a parent and a child component. Developers shouldn't write to the parameter in a [set accessor/setter (`set`)](/dotnet/csharp/programming-guide/classes-and-structs/using-properties#the-set-accessor), either from inside or outside the component.
24+
A component parameter is a framework-managed communication channel between a parent and a child component. Developers shouldn't read or write to the parameter in a [get (getter) or set (setter) accessor (`get`/`set`)](/dotnet/csharp/programming-guide/classes-and-structs/using-properties), either from inside or outside the component.
2525

26-
Side effects of writing directly to a component parameter in a setter include infinite rendering loops, unexpected extra renderings, and parameter value overwrites.
26+
Possible side effects of interacting directly with a component parameter include infinite rendering loops, unexpected extra renderings, and parameter value overwrites.
2727

2828
## How to fix violations
2929

30-
Implement the component parameter as an auto property and override <xref:Microsoft.AspNetCore.Components.ComponentBase.OnParametersSet%2A> or <xref:Microsoft.AspNetCore.Components.ComponentBase.OnParametersSetAsync%2A> in the component class to transform the parameter's value. For more information, see the [`OnParametersSet{Async}` lifecycle method](xref:blazor/components/lifecycle#after-parameters-are-set-onparameterssetasync).
30+
Implement the component parameter as an auto property and override <xref:Microsoft.AspNetCore.Components.ComponentBase.OnParametersSet%2A> or <xref:Microsoft.AspNetCore.Components.ComponentBase.OnParametersSetAsync%2A> in the component class to read or transform the parameter's value. For more information, see the [`OnParametersSet{Async}` lifecycle method](xref:blazor/components/lifecycle#after-parameters-are-set-onparameterssetasync).
3131

3232
## When to suppress warnings
3333

0 commit comments

Comments
 (0)