import { useRef } from "react";
/**
 * This hook pipes a data and when it is set to a falsy value ("", undefined, null, 0),
 * it returns the previous valid value
 */
export default function useFreeze(something) {
    const currChildOrPrev = useRef(undefined);
    currChildOrPrev.current =
        something === undefined ? currChildOrPrev.current : something;
    return currChildOrPrev.current;
}
//# sourceMappingURL=useFreeze.js.map