useSuspenseView function

Module @runic-artifex/react in @runic-artifex/react 0.23.0

function useSuspenseView<TClient extends ViewClient>(source: ViewConnector<TClient> | TClient, options?: SuspenseViewOptions): SuspenseViewHandle<TClient>;

Suspends the component until a generated View reference connects, then renders its state. A failed connection is thrown to the nearest error boundary; call retrySuspenseView(reference) when resetting the boundary to connect again. An unretried failure, and a connection whose component never mounted, is released after options.releaseTimeout (ten seconds by default). Components that pass a reference with the same connect function share one client, which is disposed options.keepAlive milliseconds (2000 by default) after the last of them unmounts. Pass a stable function such as a generated page reference or { connect: connectWorkspace }: a function recreated on every render never resolves. An already connected client is observed and left to its owner.