How to use the @shopify/react-intersection-observer.UnsupportedBehavior.TreatAsIntersecting function in @shopify/react-intersection-observer

To help you get started, we’ve selected a few @shopify/react-intersection-observer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / quilt / packages / react-async / src / Async.tsx View on Github external
const effect =
      resolved != null && id != null && manager != null ? (
         manager.markAsUsed(id())}
        />
      ) : null;

    const content = loading ? renderLoading() : render(resolved);

    const intersectionObserver =
      loading && defer === DeferTiming.InViewport ? (
        
      ) : null;

    return (
      <>
        {effect}
        {content}
        {intersectionObserver}
      
    );
  }

@shopify/react-intersection-observer

A React wrapper around the Intersection Observer API

MIT
Latest version published 5 months ago

Package Health Score

62 / 100
Full package analysis

Similar packages