Have you considered using the same ResizeObserver for all hooks instead of creating a separate ResizeObserver instance for each hook? Multiple observers each observing one element seems to be less performant than one observer observing multiple elements (see https://github.com/WICG/resize-observer/issues/59#issuecomment-408098151).
Have you considered using the same ResizeObserver for all hooks instead of creating a separate ResizeObserver instance for each hook? Multiple observers each observing one element seems to be less performant than one observer observing multiple elements (see https://github.com/WICG/resize-observer/issues/59#issuecomment-408098151).