import * as React from 'react';
var UNINITIALIZED = {};
export function useLazyRef(init, initArg) {
  var ref = React.useRef(UNINITIALIZED);
  if (ref.current === UNINITIALIZED) {
    ref.current = init(initArg);
  }
  return ref;
}