How to use @shopify/react-idle - 6 common examples

To help you get started, we’ve selected a few @shopify/react-idle 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-graphql / src / async / component.tsx View on Github external
function KeepFresh(
    options: VariableOptions &
      Pick, 'pollInterval'>,
  ) {
    useIdleCallback((useKeepFresh as any)(options));
    return null;
  }
github Shopify / quilt / packages / react-async / src / component.tsx View on Github external
function Preload(options: PreloadOptions) {
    useIdleCallback(usePreload(options));
    return null;
  }
github Shopify / quilt / packages / react-graphql / src / async / component.tsx View on Github external
function Prefetch(options: VariableOptions) {
    useIdleCallback((usePrefetch as any)(options));
    return null;
  }
github Shopify / quilt / packages / react-async / src / provider.tsx View on Github external
function Preload() {
    const preload = usePreload();
    useIdleCallback(preload);
    return null;
  }
github Shopify / quilt / packages / react-graphql / src / async / component.tsx View on Github external
function Preload() {
    useIdleCallback(usePreload());
    return null;
  }
github Shopify / quilt / packages / react-async / src / component.tsx View on Github external
function KeepFresh(options: KeepFreshOptions) {
    useIdleCallback(useKeepFresh(options));
    return null;
  }

@shopify/react-idle

Utilities for working with idle callbacks in React

MIT
Latest version published 5 months ago

Package Health Score

62 / 100
Full package analysis

Popular @shopify/react-idle functions

Similar packages