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
// Validates that we can use persisted state across server, webasembly, and auto modes, with and without
35
+
// streaming rendering.
36
+
// For streaming rendering, we validate that the state is captured and restored after streaming completes.
37
+
// For enhanced navigation we validate that the state is captured at the time components are rendered for
38
+
// the first time on the page.
39
+
// For auto mode, we validate that the state is captured and restored for both server and wasm runtimes.
40
+
// In each case, we validate that the state is available until the initial set of components first render reaches quiescence. Similar to how it works for Server and WebAssembly.
41
+
// For server we validate that the state is provided every time a circuit is initialized.
interactiveRuntime=!interactive?"none":mode=="server"||mode=="wasm"?mode:(interactiveRuntime??thrownewInvalidOperationException("Specify interactiveRuntime for auto mode"));
Copy file name to clipboardExpand all lines: src/Components/test/testassets/Components.TestServer/RazorComponents/Pages/PersistentState/PageWithComponents.razor
<aid="page-no-components-link"href=@($"persistent-state/page-no-components?render-mode={RenderMode}&streaming-id={StreamingId}")>Go to page with no components</a>
Copy file name to clipboardExpand all lines: src/Components/test/testassets/Components.TestServer/RazorComponents/Pages/PersistentState/PageWithoutComponents.razor
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@
4
4
5
5
<aid="page-with-components-link"href=@($"persistent-state/page-with-components?render-mode={RenderMode}&streaming-id={StreamingId}")>Go to page with components</a>
6
6
7
+
<aid="page-with-components-link-and-state"href=@($"persistent-state/page-with-components?render-mode={RenderMode}&streaming-id={StreamingId}&server-state=other")>Go to page with components</a>
Copy file name to clipboardExpand all lines: src/Components/test/testassets/TestContentPackage/PersistentComponents/NonStreamingComponentWithPersistentState.razor
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,20 @@
3
3
<p>This component demonstrates state persistence in the absence of streaming rendering. When the component renders it will try to restore the state and if present display that it succeded in doing so and the restored value. If the state is not present, it will indicate it didn't find it and display a "fresh" value.</p>
Copy file name to clipboardExpand all lines: src/Components/test/testassets/TestContentPackage/PersistentComponents/StreamingComponentWithPersistentState.razor
0 commit comments