interface UseViewOptions<TClient extends ViewClient> Connects a generated View reference while the current effect scope (for example a component) is active and exposes its state as shallow refs. A changed reference disposes the previous client; disposing the scope disposes the current one. Call it in setup() or effectScope().run(): outside an effect scope the client is never released (development builds warn). Pass a getter such as () => props.page to follow a prop. A reference is identified by its connect function, so a getter returning a new { connect: connectWorkspace } object does not reconnect.
Properties
release
readonly release?: (client: TClient) => void; Releases a client this composable connected. Defaults to client.dispose().
keepAlive
readonly keepAlive?: number; Milliseconds a client this composable connected stays connected after the component unmounts or the source changes, for the next composable that follows the same reference (StrictMode, HMR, <Activity>, A→B→A navigation). 0 disposes it at once. Defaults to 2000. Read once, when the composable is created.