Files
bun.sh/examples/hello-create-react-app/src/reportWebVitals.js
Jarred Sumner ac123f2371 create-react-app
Former-commit-id: 33647ef65cbac1c89c16a8b81dfa7de0fad5af3e
2021-09-05 15:34:35 -07:00

14 lines
362 B
JavaScript

const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;