react-realtime-hooks 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSyncExternalStore, useRef, useState, useEffect, useMemo,
|
|
1
|
+
import { useSyncExternalStore, useRef, useState, useEffect, useMemo, useInsertionEffect, useCallback } from 'react';
|
|
2
2
|
|
|
3
3
|
// src/hooks/useOnlineStatus.ts
|
|
4
4
|
|
|
@@ -468,9 +468,7 @@ var useReconnect = (options = {}) => {
|
|
|
468
468
|
const commitState = (next) => {
|
|
469
469
|
const resolved = typeof next === "function" ? next(stateRef.current) : next;
|
|
470
470
|
stateRef.current = resolved;
|
|
471
|
-
|
|
472
|
-
setState(resolved);
|
|
473
|
-
});
|
|
471
|
+
setState(resolved);
|
|
474
472
|
};
|
|
475
473
|
const runAttempt = useStableCallback((attempt) => {
|
|
476
474
|
commitState({
|