import { useRef } from 'react';
import { v4 } from 'uuid';

var getUniqueId = function getUniqueId() {
  return v4();
};
function useUniqueId() {
  var idRef = useRef(null);
  if (idRef.current === null) {
    idRef.current = getUniqueId();
  }
  return idRef.current;
}

export { useUniqueId };
