PHP 8.2.30
Preview: useIsomorphicLayoutEffect.ts Size: 997 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/react-redux/src/utils/useIsomorphicLayoutEffect.ts

import * as React from 'react'

// React currently throws a warning when using useLayoutEffect on the server.
// To get around it, we can conditionally useEffect on the server (no-op) and
// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store
// subscription callback always has the selector from the latest render commit
// available, otherwise a store update may happen between render and the effect,
// which may cause missed updates; we also must ensure the store subscription
// is created synchronously, otherwise a store update may occur before the
// subscription is created and an inconsistent state may be observed

// Matches logic in React's `shared/ExecutionEnvironment` file
export const canUseDOM = !!(
  typeof window !== 'undefined' &&
  typeof window.document !== 'undefined' &&
  typeof window.document.createElement !== 'undefined'
)

export const useIsomorphicLayoutEffect = canUseDOM
  ? React.useLayoutEffect
  : React.useEffect

Directory Contents

Dirs: 0 × Files: 12

Name Size Perms Modified Actions
412 B lrw-r--r-- 2026-02-28 00:29:40
Edit Download
527 B lrw-r--r-- 2026-02-28 00:29:42
Edit Download
495 B lrw-r--r-- 2026-02-28 00:29:52
Edit Download
168 B lrw-r--r-- 2026-02-28 00:29:58
Edit Download
53 B lrw-r--r-- 2026-02-28 00:29:58
Edit Download
753 B lrw-r--r-- 2026-02-28 00:30:00
Edit Download
4.11 KB lrw-r--r-- 2026-02-28 00:30:02
Edit Download
175 B lrw-r--r-- 2026-02-28 00:30:06
Edit Download
997 B lrw-r--r-- 2026-02-28 00:30:06
Edit Download
364 B lrw-r--r-- 2026-02-28 00:30:08
Edit Download
353 B lrw-r--r-- 2026-02-28 00:30:10
Edit Download
665 B lrw-r--r-- 2026-02-28 00:30:12
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).