reportWebVitals.js 362 Bytes
Newer Older
Spark's avatar
layout    
Spark committed
1
const reportWebVitals = onPerfEntry => {
Spark's avatar
tsx    
Spark committed
2
3
4
5
6
7
8
9
10
11
12
13
  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;