/**
 * amis-ui v6.14.0-beta.1
 * Copyright 2018-2025 fex
 */

import { useRef, useEffect } from 'react';

var useUpdateEffect = function (effect, deps) {
    var isMounted = useRef(false);
    useEffect(function () {
        if (!isMounted.current) {
            isMounted.current = true;
        }
        else {
            return effect();
        }
        return undefined;
    }, deps);
};

export { useUpdateEffect as default };
