import { useEffect } from 'react';
import { useRafCallback } from '../useRafCallback/index.js';
export function useRafEffect(callback, deps) {
    const [rafCallback, cancelRaf] = useRafCallback(callback);
    useEffect(() => {
        rafCallback();
        return cancelRaf;
    }, deps);
}
