Skip to main content

Interface: ConvexReactClientOptions

react.ConvexReactClientOptions

Options for ConvexReactClient.

Hierarchy

Properties

unsavedChangesWarning

Optional unsavedChangesWarning: boolean

Whether to prompt the user if they have unsaved changes pending when navigating away or closing a web page.

This is only possible when the window object exists, i.e. in a browser.

The default value is true in browsers.

Inherited from

BaseConvexClientOptions.unsavedChangesWarning

Defined in

browser/sync/client.ts:59


webSocketConstructor

Optional webSocketConstructor: Object

Call signature

new webSocketConstructor(url, protocols?): WebSocket

Specifies an alternate WebSocket constructor to use for client communication with the Convex cloud. The default behavior is to use WebSocket from the global environment.

Parameters
NameType
urlstring | URL
protocols?string | string[]
Returns

WebSocket

Type declaration

NameType
prototypeWebSocket
CONNECTING0
OPEN1
CLOSING2
CLOSED3

Inherited from

BaseConvexClientOptions.webSocketConstructor

Defined in

browser/sync/client.ts:66


verbose

Optional verbose: boolean

Adds additional logging for debugging purposes.

The default value is false.

Inherited from

BaseConvexClientOptions.verbose

Defined in

browser/sync/client.ts:72


logger

Optional logger: boolean | Logger

A logger, true, or false. If not provided or true, logs to the console. If false, logs are not printed anywhere.

You can construct your own logger to customize logging to log elsewhere.

Inherited from

BaseConvexClientOptions.logger

Defined in

browser/sync/client.ts:79


reportDebugInfoToConvex

Optional reportDebugInfoToConvex: boolean

Sends additional metrics to Convex for debugging purposes.

The default value is false.

Inherited from

BaseConvexClientOptions.reportDebugInfoToConvex

Defined in

browser/sync/client.ts:85


skipConvexDeploymentUrlCheck

Optional skipConvexDeploymentUrlCheck: boolean

Skip validating that the Convex deployment URL looks like https://happy-animal-123.convex.cloud or localhost.

This can be useful if running a self-hosted Convex backend that uses a different URL.

The default value is false

Inherited from

BaseConvexClientOptions.skipConvexDeploymentUrlCheck

Defined in

browser/sync/client.ts:95


authRefreshTokenLeewaySeconds

Optional authRefreshTokenLeewaySeconds: number

If using auth, the number of seconds before a token expires that we should refresh it.

The default value is 2.

Inherited from

BaseConvexClientOptions.authRefreshTokenLeewaySeconds

Defined in

browser/sync/client.ts:101