Skip to content

Commit 88539e2

Browse files
authored
Update performance.md
1 parent 9da6df1 commit 88539e2

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

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

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

0 commit comments

Comments
 (0)