'use strict';

var React = require('react');
var uuid = require('uuid');

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

exports.useUniqueId = useUniqueId;
