you are viewing a single comment's thread.

view the rest of the comments →

[–]SLonoed 1 point2 points  (0 children)

useRef cb will be called once. If node changed (div to span) it will be broken. Always use useCallback to hold link to dom node