You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Measuring in real time would need useEffect to run on every render reading the value of a traditional ref. Is there some other example that would make more sense to demonstrate callback refs?
The text was updated successfully, but these errors were encountered:
https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node
This is a bad example for callback refs. The callback only gets called if:
<input>
element changesIt does NOT get called if the dom node is resized. Example:
Measuring in real time would need
useEffect
to run on every render reading the value of a traditional ref. Is there some other example that would make more sense to demonstrate callback refs?The text was updated successfully, but these errors were encountered: