react-intersection-observer-hook icon indicating copy to clipboard operation
react-intersection-observer-hook copied to clipboard

Dealing with multiple child refs

Open joepio opened this issue 3 years ago • 1 comments

Hi, thanks for creating this!

So I want to track a list of items (chat messages in an infinite scrolling list) in a custom scrollable div. If I understand correctly, this means I should use rootRef for the parent. However, since I have multiple children, I need a ref for every chilld, but only one for the parent. Does this library support this? I tried setting the root in the options (passing the parentRef), but for some reason that does not work.

joepio avatar May 13 '22 07:05 joepio

Exactly same problem/situation here.

ancorgs avatar Jun 30 '22 13:06 ancorgs