Skip to content

Commit 1fe76f7

Browse files
hakenrguardrex
andauthored
Update aspnetcore/blazor/performance.md
Co-authored-by: Luke Latham <[email protected]>
1 parent 6ee0c16 commit 1fe76f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aspnetcore/blazor/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To prevent rendering recursion into a particular subtree, use either of the foll
4848

4949
To prevent rendering recursion into a particular subtree, use either of the following approaches:
5050

51-
* Ensure that the **set** parameters of child components are of primitive immutable types, such as `string`, `int`, `bool`, `DateTime`, and other similar types. The built-in logic for detecting changes automatically skips rerendering if the primitive immutable parameter values haven't changed. Only the parameters that are explicitly set on the component are considered for change detection. If you render a child component with `<Customer CustomerId="item.CustomerId" />`, where `CustomerId` is an `int` type, then the `Customer` component isn't rerendered unless `item.CustomerId` changes.
51+
* Ensure that the set parameters of child components are of primitive immutable types, such as `string`, `int`, `bool`, `DateTime`, and other similar types. The built-in logic for detecting changes automatically skips rerendering if the primitive immutable parameter values haven't changed. Only the parameters that are explicitly set on the component are considered for change detection. If you render a child component with `<Customer CustomerId="item.CustomerId" />`, where `CustomerId` is an `int` type, then the `Customer` component isn't rerendered unless `item.CustomerId` changes.
5252
* Override <xref:Microsoft.AspNetCore.Components.ComponentBase.ShouldRender%2A>:
5353
* To accept nonprimitive parameter values, such as complex custom model types, event callbacks, or <xref:Microsoft.AspNetCore.Components.RenderFragment> values.
5454
* If authoring a UI-only component that doesn't change after the initial render, regardless of parameter value changes.

0 commit comments

Comments
 (0)