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
// the ref we expose to the user const ref = (node: HTMLOrSVGElement | null) => { if (!node || node === state.current.element) return removeListeners() state.current.element = node state.current.scrollContainers = findScrollContainers(node) addListeners() }
Why should this functional ref, not be memoized using useCallback?
If a parent component is using useMeasure and drilling down this ref to it's children, it causes unnecessary re-renders.
The text was updated successfully, but these errors were encountered:
// the ref we expose to the user const ref = (node: HTMLOrSVGElement | null) => { if (!node || node === state.current.element) return removeListeners() state.current.element = node state.current.scrollContainers = findScrollContainers(node) addListeners() }
Why should this functional ref, not be memoized using useCallback?
If a parent component is using useMeasure and drilling down this ref to it's children, it causes unnecessary re-renders.
The text was updated successfully, but these errors were encountered: