import { useRef } from 'react';

/**
 * Debug hook for counting the amount of renders and putting it on the console
 * @param name This will be used on the log message.
 */
export const useDEBUGRenderCount = (name: string): void => {
  const count = useRef(0);
  count.current += 1;

  console.log(`'${name}' rendered ${count.current} times`);
};
