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
Move ResolvePropertyGetter SerializerFactory and PropertyGetterFactory into ComponentSubscription.
46
+
47
+
Move _serializerCache, _propertyGetterCache and _keyCache into ComponentSubscription.
48
+
49
+
Update the `ComponentSubscription` constructor to take in the "source" values and compute the property getter, the custom serializer, and so on inside the constructor.
Copy file name to clipboardExpand all lines: src/Components/test/E2ETest/Tests/StatePersistenceTest.cs
+83-67Lines changed: 83 additions & 67 deletions
Original file line number
Diff line number
Diff line change
@@ -107,14 +107,24 @@ public void CanRenderComponentWithPersistedState(bool suppressEnhancedNavigation
107
107
}
108
108
}
109
109
110
+
// Validates that we can use persisted state across server, webassembly, and auto modes, with and without
111
+
// streaming rendering.
112
+
// For streaming rendering, we validate that the state is captured and restored after streaming completes.
113
+
// For enhanced navigation we validate that the state is captured at the time components are rendered for
114
+
// the first time on the page.
115
+
// For auto mode, we validate that the state is captured and restored for both server and wasm runtimes.
116
+
// 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.
117
+
// 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"));
<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
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
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 and state</a>
8
8
9
+
<aid="page-with-components-link-and-declarative-state"href=@($"persistent-state/page-with-declarative-state-components?render-mode={RenderMode}&streaming-id={StreamingId}&server-state=other")>Go to page with declarative state components</a>
0 commit comments