import * as t from "react";
function c(r) {
  const e = t.useRef(!1), [u, a] = t.useState(r);
  t.useEffect(() => (e.current = !1, () => {
    e.current = !0;
  }), []);
  function f(s, n) {
    n && e.current || a(s);
  }
  return [u, f];
}
export {
  c as default
};
