You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/diagnostics/bl0007.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,13 @@ A [component parameter](xref:blazor/components/index#component-parameters), whic
21
21
22
22
## Rule description
23
23
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.
25
25
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.
27
27
28
28
## How to fix violations
29
29
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).
0 commit comments