import { useEffect, useRef } from "react";
export default (function (value, distinct) {
  if (distinct === void 0) {
    distinct = false;
  }
  var prevRef = useRef();
  useEffect(function () {
    prevRef.current = value;
  }, [distinct ? value : ""]);
  return prevRef.current;
});