How to use use-callback-ref - 1 common examples

To help you get started, we’ve selected a few use-callback-ref 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 theKashey / react-remove-scroll / src / UI.tsx View on Github external
children,
    className,
    removeScrollBar,
    enabled,
    shards,
    sideCar,
    noIsolation,
    inert,
    allowPinchZoom,
    ...rest
  } = props;

  const SideCar: SideCarComponent = sideCar;

  const containerProps = {
    ref: useMergeRefs([
      ref,
      parentRef as React.MutableRefObject
    ]),
    ...rest,
    ...callbacks
  };

  return (
    
      {enabled && (

use-callback-ref

The same useRef, but with callback

MIT
Latest version published 5 days ago

Package Health Score

83 / 100
Full package analysis

Popular use-callback-ref functions