Future API idea:
function MyWidget ({ onSeen }) {
const ref = useRef(null);
// instead callback we pass object with stateless: false to make it stateful
// (stateless: true by default for backward compatibility)
const seen = useIntersection(ref, {
stateless: false,
});
return <div ref={ref}>Widget</div>;
}