Skip to content

Correct useLayoutEffect documentation #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/React/Basic/Hooks.purs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ useEffectAlways effect = unsafeHook (runEffectFn1 useEffectAlways_ effect)

foreign import data UseEffect :: Type -> Type -> Type

-- | Like `useEffect`, but the effect is performed on every render. Prefer `useEffect`
-- | 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
-- | before layout, such as element sizes and positions. Prefer `useEffect` whenever
-- | possible to avoid blocking browser painting.
useLayoutEffect ::
forall deps.
Eq deps =>
Expand Down