React JS Quiz
Home
Blog
Privacy Policy
Contact Us
React TypeScript Quiz
Why is null commonly included in a ref initial value?
Report this question
The DOM node is not available until after React renders it
Show Explanation
A DOM ref starts as null before the element is mounted, then React assigns the DOM node to current.
Refs can only store strings
React requires all refs to stay null
TypeScript cannot type DOM nodes
Next Question (13/20)