Skip to content

Commit 6ee0c16

Browse files
hakenrguardrex
andauthored
update
Co-authored-by: Luke Latham <[email protected]>
1 parent 1cdfe60 commit 6ee0c16

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
@@ -37,7 +37,7 @@ The last two steps of the preceding sequence continue recursively down the compo
3737

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

40-
* 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.
40+
* 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.
4141
* Override <xref:Microsoft.AspNetCore.Components.ComponentBase.ShouldRender%2A>:
4242
* To accept nonprimitive parameter values, such as complex custom model types, or <xref:Microsoft.AspNetCore.Components.RenderFragment> values.
4343
* If authoring a UI-only component that doesn't change after the initial render, regardless of parameter value changes.

0 commit comments

Comments
 (0)