Conway's Game of Life as a React web app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reportWebVitals.ts 425B

123456789101112131415
  1. import { ReportHandler } from 'web-vitals';
  2. const reportWebVitals = (onPerfEntry?: ReportHandler) => {
  3. if (onPerfEntry && onPerfEntry instanceof Function) {
  4. import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
  5. getCLS(onPerfEntry);
  6. getFID(onPerfEntry);
  7. getFCP(onPerfEntry);
  8. getLCP(onPerfEntry);
  9. getTTFB(onPerfEntry);
  10. });
  11. }
  12. };
  13. export default reportWebVitals;