0
Fork 0
mirror of https://github.com/TanStack/form.git synced 2026-11-18 07:36:42 +00:00
form/docs/framework/preact/reference/variables/useIsomorphicLayoutEffect.md
2026-05-08 17:36:16 +00:00

950 B

id title
useIsomorphicLayoutEffect useIsomorphicLayoutEffect

Variable: useIsomorphicLayoutEffect()

const useIsomorphicLayoutEffect: (effect, inputs?) => void;

Defined in: packages/preact-form/src/useIsomorphicLayoutEffect.ts:3

Accepts a function that contains imperative, possibly effectful code. Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside useLayoutEffect will be flushed synchronously, after all DOM mutations but before the browser has a chance to paint. Prefer the standard useEffect hook when possible to avoid blocking visual updates.

Parameters

effect

EffectCallback

Imperative function that can return a cleanup function

inputs?

Inputs

If present, effect will only activate if the values in the list change (using ===).

Returns

void