@tanstack/react-query-devtools 4.3.0-beta.5 → 4.3.0-beta.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-query-devtools",
3
- "version": "4.3.0-beta.5",
3
+ "version": "4.3.0-beta.7",
4
4
  "description": "TODO",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -18,6 +18,11 @@
18
18
  "import": "./build/lib/index.mjs",
19
19
  "default": "./build/lib/index.js"
20
20
  },
21
+ "./production": {
22
+ "types": "./build/lib/index.d.ts",
23
+ "import": "./build/lib/index.prod.mjs",
24
+ "default": "./build/lib/index.prod.js"
25
+ },
21
26
  "./build/lib/index.prod.js": {
22
27
  "types": "./build/lib/index.d.ts",
23
28
  "import": "./build/lib/index.prod.mjs",
package/src/devtools.tsx CHANGED
@@ -99,8 +99,6 @@ interface DevtoolsPanelOptions extends ContextOptions {
99
99
  handleDragStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void
100
100
  }
101
101
 
102
- const isServer = typeof window === 'undefined'
103
-
104
102
  export function ReactQueryDevtools({
105
103
  initialIsOpen,
106
104
  panelProps = {},
@@ -192,7 +190,7 @@ export function ReactQueryDevtools({
192
190
  }
193
191
  }, [isResolvedOpen])
194
192
 
195
- React[isServer ? 'useEffect' : 'useLayoutEffect'](() => {
193
+ React.useEffect(() => {
196
194
  if (isResolvedOpen) {
197
195
  const previousValue = rootRef.current?.parentElement?.style.paddingBottom
198
196
 
package/src/utils.ts CHANGED
@@ -4,8 +4,6 @@ import type { Query } from '@tanstack/react-query'
4
4
  import { Theme, useTheme } from './theme'
5
5
  import useMediaQuery from './useMediaQuery'
6
6
 
7
- export const isServer = typeof window === 'undefined'
8
-
9
7
  type StyledComponent<T> = T extends 'button'
10
8
  ? React.DetailedHTMLProps<
11
9
  React.ButtonHTMLAttributes<HTMLButtonElement>,
@@ -104,7 +102,7 @@ export function useIsMounted() {
104
102
  const mountedRef = React.useRef(false)
105
103
  const isMounted = React.useCallback(() => mountedRef.current, [])
106
104
 
107
- React[isServer ? 'useEffect' : 'useLayoutEffect'](() => {
105
+ React.useEffect(() => {
108
106
  mountedRef.current = true
109
107
  return () => {
110
108
  mountedRef.current = false