Skip to content

Commit fde6aab

Browse files
committed
fix: react-native uSES usage
1 parent e0d5394 commit fde6aab

File tree

10 files changed

+16
-6
lines changed

10 files changed

+16
-6
lines changed

packages/react-query-devtools/src/devtools.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { useSyncExternalStore } from 'use-sync-external-store/shim'
2+
import { useSyncExternalStore } from './useSyncExternalStore'
33
import {
44
useQueryClient,
55
onlineManager,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
2+
// @ts-ignore
3+
export { useSyncExternalStore } from 'use-sync-external-store/shim/index.native.js'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
2+
export { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'

packages/react-query/src/useBaseQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { useSyncExternalStore } from 'use-sync-external-store/shim'
2+
import { useSyncExternalStore } from './useSyncExternalStore'
33

44
import { QueryKey, notifyManager, QueryObserver } from '@tanstack/query-core'
55
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'

packages/react-query/src/useIsFetching.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
QueryFilters,
77
} from '@tanstack/query-core'
88

9-
import { useSyncExternalStore } from 'use-sync-external-store/shim'
9+
import { useSyncExternalStore } from './useSyncExternalStore'
1010
import { ContextOptions } from './types'
1111
import { useQueryClient } from './QueryClientProvider'
1212

packages/react-query/src/useIsMutating.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { useSyncExternalStore } from 'use-sync-external-store/shim'
2+
import { useSyncExternalStore } from './useSyncExternalStore'
33

44
import {
55
notifyManager,

packages/react-query/src/useMutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { useSyncExternalStore } from 'use-sync-external-store/shim'
2+
import { useSyncExternalStore } from './useSyncExternalStore'
33

44
import {
55
notifyManager,

packages/react-query/src/useQueries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import { useSyncExternalStore } from 'use-sync-external-store/shim'
2+
import { useSyncExternalStore } from './useSyncExternalStore'
33

44
import {
55
QueryKey,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
2+
// @ts-ignore
3+
export { useSyncExternalStore } from 'use-sync-external-store/shim/index.native.js'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
2+
export { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'

0 commit comments

Comments
 (0)