react-code-dataset / wp-calypso /packages /domains-table /__mocks__ /react-intersection-observer.ts
Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
Raw History Blame Contribute Delete
205 Bytes
import { createRef } from 'react';
// jsdom doesn't mock the IntersectionObserver API used by react-intersection-observer
export function useInView() {
return {
ref: createRef(),
inView: true,
};
}