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/state-management.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -446,6 +446,11 @@ Generally, `sessionStorage` is safer to use. `sessionStorage` avoids the risk th
446
446
> [!WARNING]
447
447
> Users may view or tamper with the data stored in `localStorage` and `sessionStorage`.
448
448
449
+
When implementing custom browser state storage, a useful approach is to adopt [cascading values and parameters](xref:blazor/components/cascading-values-and-parameters):
450
+
451
+
* To consume state across many components.
452
+
* If there's just one top-level state object to persist.
453
+
449
454
<h2id="in-memory-state-container-service-wasm">In-memory state container service</h2>
@@ -886,6 +891,11 @@ Generally, `sessionStorage` is safer to use. `sessionStorage` avoids the risk th
886
891
> [!WARNING]
887
892
> Users may view or tamper with the data stored in `localStorage` and `sessionStorage`.
888
893
894
+
When implementing custom browser state storage, a useful approach is to adopt [cascading values and parameters](xref:blazor/components/cascading-values-and-parameters):
895
+
896
+
* To consume state across many components.
897
+
* If there's just one top-level state object to persist.
898
+
889
899
<h2id="in-memory-state-container-service-wasm">In-memory state container service</h2>
@@ -1341,6 +1351,11 @@ Generally, `sessionStorage` is safer to use. `sessionStorage` avoids the risk th
1341
1351
> [!WARNING]
1342
1352
> Users may view or tamper with the data stored in `localStorage` and `sessionStorage`.
1343
1353
1354
+
When implementing custom browser state storage, a useful approach is to adopt [cascading values and parameters](xref:blazor/components/cascading-values-and-parameters):
1355
+
1356
+
* To consume state across many components.
1357
+
* If there's just one top-level state object to persist.
1358
+
1344
1359
<h2id="in-memory-state-container-service-wasm">In-memory state container service</h2>
0 commit comments