Skip to content

Commit

Permalink
fix: uSES import for react-native / esm (#3601)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirbod authored May 12, 2022
1 parent 5f80b09 commit e01a7bb
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/devtools/devtools.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
import { useSyncExternalStore } from '../reactjs/useSyncExternalStore'
import {
Query,
useQueryClient,
Expand Down
2 changes: 1 addition & 1 deletion src/reactjs/useBaseQuery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
import { useSyncExternalStore } from './useSyncExternalStore'

import { QueryKey, notifyManager, QueryObserver } from '../core'
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'
Expand Down
2 changes: 1 addition & 1 deletion src/reactjs/useIsFetching.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
import { useSyncExternalStore } from './useSyncExternalStore'

import { ContextOptions } from './types'
import { QueryKey, notifyManager } from '../core'
Expand Down
2 changes: 1 addition & 1 deletion src/reactjs/useIsMutating.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
import { useSyncExternalStore } from './useSyncExternalStore'

import { notifyManager } from '../core/notifyManager'
import { MutationKey } from '../core/types'
Expand Down
2 changes: 1 addition & 1 deletion src/reactjs/useMutation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
import { useSyncExternalStore } from './useSyncExternalStore'

import { notifyManager } from '../core'
import { noop, parseMutationArgs } from '../core/utils'
Expand Down
2 changes: 1 addition & 1 deletion src/reactjs/useQueries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
import { useSyncExternalStore } from './useSyncExternalStore'

import { QueryKey, QueryFunction } from '../core/types'
import { notifyManager } from '../core/notifyManager'
Expand Down
2 changes: 2 additions & 0 deletions src/reactjs/useSyncExternalStore.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @ts-ignore
export { useSyncExternalStore } from 'use-sync-external-store/shim/index.native.js'
1 change: 1 addition & 0 deletions src/reactjs/useSyncExternalStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'

0 comments on commit e01a7bb

Please sign in to comment.