I'm using the IntersectionObserver in a useEffect. This is the clean up function for my useEffect. Is using both observer.unobserve and observer.disconnect redundant? Should I only use one?
return () => {
items.forEach((item) => {
observer.unobserve(item)
})
observer.disconnect()
}, [])