UNPKG

cra-template-ts-prettier-eslint-airbnb

Version:

Template for Create React App supporting TypeScript with Prettier and ESlint config recommended by Airbnb.

22 lines (19 loc) 465 B
import { ReportHandler } from 'web-vitals'; const reportWebVitals = (onPerfEntry?: ReportHandler): void => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFCP, getFID, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFCP(onPerfEntry); getFID(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); } }; export default reportWebVitals;