Can be used as a starting point for implementing your own specific check to see if an element is in view.
const YourViewComponent = () => {
const { isInView, inViewRef } = useInView();
return (
<div ref={inViewRef} className={isInView ? 'inViewClass' : 'outOfViewClass'}>
Some content
</div>
);
};