({
options,
unmount,
}: {
options?: IntersectionOptions;
unmount?: boolean;
})
| 10 | import { useInView } from "../useInView"; |
| 11 | |
| 12 | const HookComponent = ({ |
| 13 | options, |
| 14 | unmount, |
| 15 | }: { |
| 16 | options?: IntersectionOptions; |
| 17 | unmount?: boolean; |
| 18 | }) => { |
| 19 | const [ref, inView] = useInView(options); |
| 20 | return ( |
| 21 | <div data-testid="wrapper" ref={!unmount ? ref : undefined}> |
| 22 | {inView.toString()} |
| 23 | </div> |
| 24 | ); |
| 25 | }; |
| 26 | |
| 27 | const LazyHookComponent = ({ options }: { options?: IntersectionOptions }) => { |
| 28 | const [isLoading, setIsLoading] = React.useState(true); |
nothing calls this directly
no test coverage detected
searching dependent graphs…