Skip to content
Source
Sign inSign up
TanStack/query

fix: react native uSES #4185

MergedDamianOsipiuk(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/4185/headmerged by TkDodo View on GitHub

Showing 3 changed files with 9 additions and 3 deletions.

x
0 of 3 viewed, 3 left
3 additions and 1 deletionpackages/react-query/src/useSyncExternalStore.native.tsModified
View file
@@ -1,3 +1,5 @@
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
// @ts-ignore
-export { useSyncExternalStore } from 'use-sync-external-store/shim/index.native.js'
+import { useSyncExternalStore } from 'use-sync-external-store/shim/index.native.js'
+​
+export { useSyncExternalStore }
3 additions and 1 deletionpackages/react-query/src/useSyncExternalStore.tsModified
View file
@@ -1,2 +1,4 @@
// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601
-export { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
+import { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'
+​
+export const useSyncExternalStore = uSES
3 additions and 1 deletionrollup.config.tsModified
View file
@@ -80,12 +80,13 @@
packageDir: 'packages/react-query',
jsName: 'ReactQuery',
outputFile: 'index',
- entryFile: ['src/index.ts', 'src/reactBatchedUpdates.native.ts'],
+ entryFile: ['src/index.ts', 'src/reactBatchedUpdates.native.ts', 'src/useSyncExternalStore.native.ts'],
globals: {