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/blazor/fundamentals/handle-errors.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -532,7 +532,7 @@ The following `ProcessError` component example merely logs errors, but methods o
532
532
```razor
533
533
@inject ILogger<ProcessError> Logger
534
534
535
-
<CascadingValue Value="this">
535
+
<CascadingValue Value="this" IsFixed="true">
536
536
@ChildContent
537
537
</CascadingValue>
538
538
@@ -555,6 +555,8 @@ The following `ProcessError` component example merely logs errors, but methods o
555
555
556
556
> [!NOTE]
557
557
> For more information on <xref:Microsoft.AspNetCore.Components.RenderFragment>, see <xref:blazor/components/index#child-content-render-fragments>.
558
+
>
559
+
> <xref:Microsoft.AspNetCore.Components.CascadingValue%601.IsFixed%2A?displayProperty=nameWithType> is used to indicate that a cascading parameter doesn't change after initialization.
558
560
559
561
:::moniker-end
560
562
@@ -648,7 +650,7 @@ The following `ProcessError` component passes itself as a [`CascadingValue`](xre
648
650
@using Microsoft.Extensions.Logging
649
651
@inject ILogger<ProcessError> Logger
650
652
651
-
<CascadingValue Value="this">
653
+
<CascadingValue Value="this" IsFixed="true">
652
654
@ChildContent
653
655
</CascadingValue>
654
656
@@ -666,6 +668,8 @@ The following `ProcessError` component passes itself as a [`CascadingValue`](xre
666
668
667
669
> [!NOTE]
668
670
> For more information on <xref:Microsoft.AspNetCore.Components.RenderFragment>, see <xref:blazor/components/index#child-content-render-fragments>.
671
+
>
672
+
> <xref:Microsoft.AspNetCore.Components.CascadingValue%601.IsFixed%2A?displayProperty=nameWithType> is used to indicate that a cascading parameter doesn't change after initialization.
669
673
670
674
In the `App` component, wrap the <xref:Microsoft.AspNetCore.Components.Routing.Router> component with the `ProcessError` component. This permits the `ProcessError` component to cascade down to any component of the app where the `ProcessError` component is received as a [`CascadingParameter`](xref:blazor/components/cascading-values-and-parameters#cascadingparameter-attribute).
0 commit comments