Knowledge · browser

React commit child-first ref timing

React commit attaches child DOM first, so an ancestor ref may be null at the time of a child useLayoutEffect — defer ancestor DOM side effects to useEffect

Date
2026-07-07
Reading time
4 min
Confidence
Inferred

This page is a machine translation of the Korean original. Read the original

Prerequisites

Document graph

Related documents

Documents that mention this

Related TIL

Related Knowledge

Tags

reactdomrefuselayouteffectuseeffect