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

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');

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

exports["default"] = useUpdateEffect;
