React JS Quiz
Home
Blog
Privacy Policy
Contact Us
useLayoutEffect Quiz
Which pattern can avoid a tooltip jumping on screen?
Report this question
Measure the tooltip in useLayoutEffect and update its position before paint
Show Explanation
Measuring and repositioning before paint lets the user see the tooltip in its final position.
Measure it in an event handler after the user sees it
Use a random top value
Disable React rendering
Next Question (17/20)