We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d5c0e96 + a4022df commit b13d063Copy full SHA for b13d063
src/React/Basic/Hooks.purs
@@ -221,8 +221,10 @@ useEffectAlways effect = unsafeHook (runEffectFn1 useEffectAlways_ effect)
221
222
foreign import data UseEffect :: Type -> Type -> Type
223
224
--- | Like `useEffect`, but the effect is performed on every render. Prefer `useEffect`
225
--- | with a proper dependency list whenever possible!
+-- | Like `useEffect`, but the effect is performed synchronously after the browser has
+-- | calculated layout. Useful for reading properties from the DOM that are not available
226
+-- | before layout, such as element sizes and positions. Prefer `useEffect` whenever
227
+-- | possible to avoid blocking browser painting.
228
useLayoutEffect ::
229
forall deps.
230
Eq deps =>
0 commit comments