finalizeAsync

open suspend fun finalizeAsync(state: RequestState): Deferred<Pair<State?, String?>>

"Finalize" the state for this controller, by (1) computing the state, if necessary, and (2) serializing it for embedding into the page; frontend tools can then read this state to hydrate the UI without causing additional calls to the server.

Return

Deferred task which resolves to a pair, where the first item is the State procured for this cycle via the props and propsAsync methods, and the second item is the same state, serialized as a JSON String. If no state is available, both pair members are null.

Parameters

state

Materialized HTTP request state for this cycle.