Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

[React2Hooks] Intelligent useEffect vs useLayoutEffect #37

Open
morgante opened this issue Apr 12, 2023 · 0 comments
Open

[React2Hooks] Intelligent useEffect vs useLayoutEffect #37

morgante opened this issue Apr 12, 2023 · 0 comments

Comments

@morgante
Copy link
Contributor

morgante commented Apr 12, 2023

If a useEffect depends on layout etc. it should switch to useLayoutEffect.

Sample file: https://github.com/salazarm/dagster/blob/master/js_modules/dagit/packages/core/src/graph/SVGViewport.tsx

Details: https://kentcdodds.com/blog/useeffect-vs-uselayouteffect

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant