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
Copy file name to clipboardExpand all lines: packages/core/src/bundle/hooks/useQuery/useQuery.js
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,18 @@ import { useMount } from '../useMount/useMount';
14
14
* @param {(data: Data) => void} [options.onSuccess] The callback function to be invoked on success
15
15
* @param {(error: Error) => void} [options.onError] The callback function to be invoked on error
16
16
* @param {UseQueryOptionsSelect<Data>} [options.select] The select function to be invoked
17
-
* @param {Data | (() => Data)} [options.initialData] The initial data for the hook
18
17
* @param {Data | (() => Data)} [options.placeholderData] The placeholder data for the hook
19
18
* @param {number} [options.refetchInterval] The refetch interval
20
-
* @param {boolean | number} [options.retry] The retry count of requests
19
+
* @param {boolean | number | ((failureCount: number, error: Error) => boolean)} [options.retry] The retry count of requests, or a function to decide whether to retry
21
20
* @returns {UseQueryReturn<Data>} An object with the state of the query
Copy file name to clipboardExpand all lines: packages/core/src/bundle/hooks/useWebSocket/useWebSocket.js
+28-14Lines changed: 28 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -10,27 +10,30 @@ import { getRetry } from '@/utils/helpers';
10
10
*
11
11
* @param {UseWebSocketUrl} url The URL of the WebSocket server
12
12
* @param {(webSocket: WebSocket) => void} [options.onConnected] The callback function that is called when the WebSocket connection is established
13
-
* @param {(event: CloseEvent, webSocket: WebSocket) => void} [options.onDisconnected] The callback function that is called when the WebSocket connection is closed
13
+
* @param {(event: CloseEvent, webSocket: WebSocket) => void} [options.onClose] The callback function that is called when the WebSocket connection is closed
14
14
* @param {(event: Event, webSocket: WebSocket) => void} [options.onError] The callback function that is called when an error occurs
15
15
* @param {(event: MessageEvent, webSocket: WebSocket) => void} [options.onMessage] The callback function that is called when a message is received
16
-
* @param {boolean | number} [options.retry] The number of times to retry the connection
16
+
* @param {boolean} [options.immediately=true] Immediately open the connection when calling this hook
17
+
* @param {boolean | number | ((failureCount: number, event: CloseEvent) => boolean)} [options.retry] The number of times to retry the connection, or a function to decide whether to retry
17
18
* @param {Array<'soap' | 'wasm'>} [options.protocols] The list of protocols to use
18
-
* @returns {UseWebSocketReturn} An object with the status, close, send, open, and ws properties
19
+
* @returns {UseWebSocketReturn} An object with the status, close, send, open, and client properties
0 commit comments