import { useEffect } from 'react';
import { useSyncedRef } from '../useSyncedRef/index.js';
export function useUnmountEffect(effect) {
    const effectRef = useSyncedRef(effect);
    useEffect(() => () => {
        effectRef.current();
    }, []);
}
