feat(devtools): Add move devtools select menu #4100
Mergedsalamaashoush(GitHub profile, opens in a new tab)merged 3 commits into
main fromrefs/pull/4100/headmerged by TkDodo View on GitHubTkDodo reviewed
OutdatedResolvedby TkDodo@@ -99,9 +99,15 @@9999 },100100 )101101 }102+/**103+ * Resolves to useEffect when "window" is not in scope and useLayoutEffect in the browser104+ */105+export const useIsomorphicEffect = isServer106+ ? React.useEffect107+ : React.useLayoutEffect102108103109 export function useIsMounted() {104110 const mountedRef = React.useRef(false)105111 const isMounted = React.useCallback(() => mountedRef.current, [])106112107- React[isServer ? 'useEffect' : 'useLayoutEffect'](() => {113+ useIsomorphicEffect(() => {TkDodo reviewed
OutdatedResolvedby TkDodo@@ -61,3 +61,4 @@6161 `position?: "top-left" | "top-right" | "bottom-left" | "bottom-right"`6262 Defaults to `bottom-left`6363 The position of the React Query logo to open and close the devtools panel64+`origi?: "top" | "bottom" | "left" | "right"`salamaashoush(GitHub profile, opens in a new tab) changed the title
TkDodo approved these changes
TkDodo merged thise6eaca6
TkDodo closed this
Sign in to join this conversation.

This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit e7803f1b0fc872af76de635ed6e5303d4db20c30: