@braine/quantum-query 1.3.4 → 1.3.6

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 CHANGED
@@ -2210,7 +2210,7 @@ function useQuery(options) {
2210
2210
  const getSnapshot = (0, import_react8.useCallback)(() => {
2211
2211
  return observer.getSnapshot();
2212
2212
  }, [observer]);
2213
- const result = (0, import_react8.useSyncExternalStore)(subscribe, getSnapshot);
2213
+ const result = (0, import_react8.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
2214
2214
  return {
2215
2215
  ...result,
2216
2216
  signal: observer.result$
@@ -2368,6 +2368,7 @@ function useMutation(options) {
2368
2368
  }, [observer, options]);
2369
2369
  const state = (0, import_react9.useSyncExternalStore)(
2370
2370
  (0, import_react9.useCallback)((cb) => observer.signal.subscribe(cb), [observer]),
2371
+ () => observer.signal.get(),
2371
2372
  () => observer.signal.get()
2372
2373
  );
2373
2374
  const mutateAsync = (0, import_react9.useCallback)((variables) => {
@@ -2680,7 +2681,7 @@ function useInfiniteQuery(options) {
2680
2681
  const getSnapshot = (0, import_react10.useCallback)(() => {
2681
2682
  return observer.result$.get();
2682
2683
  }, [observer]);
2683
- return (0, import_react10.useSyncExternalStore)(subscribe, getSnapshot);
2684
+ return (0, import_react10.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
2684
2685
  }
2685
2686
 
2686
2687
  // src/query/HydrationBoundary.tsx
package/dist/index.js CHANGED
@@ -2163,7 +2163,7 @@ function useQuery(options) {
2163
2163
  const getSnapshot = useCallback2(() => {
2164
2164
  return observer.getSnapshot();
2165
2165
  }, [observer]);
2166
- const result = useSyncExternalStore2(subscribe, getSnapshot);
2166
+ const result = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
2167
2167
  return {
2168
2168
  ...result,
2169
2169
  signal: observer.result$
@@ -2321,6 +2321,7 @@ function useMutation(options) {
2321
2321
  }, [observer, options]);
2322
2322
  const state = useSyncExternalStore3(
2323
2323
  useCallback3((cb) => observer.signal.subscribe(cb), [observer]),
2324
+ () => observer.signal.get(),
2324
2325
  () => observer.signal.get()
2325
2326
  );
2326
2327
  const mutateAsync = useCallback3((variables) => {
@@ -2633,7 +2634,7 @@ function useInfiniteQuery(options) {
2633
2634
  const getSnapshot = useCallback4(() => {
2634
2635
  return observer.result$.get();
2635
2636
  }, [observer]);
2636
- return useSyncExternalStore4(subscribe, getSnapshot);
2637
+ return useSyncExternalStore4(subscribe, getSnapshot, getSnapshot);
2637
2638
  }
2638
2639
 
2639
2640
  // src/query/HydrationBoundary.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braine/quantum-query",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "scripts": {