1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-26 18:04:20 +00:00
triennale-appunti-steffo/src/reportWebVitals.js

14 lines
395 B
JavaScript
Raw Normal View History

const reportWebVitals = onPerfEntry => {
2021-03-24 15:14:15 +00:00
if(onPerfEntry && onPerfEntry instanceof Function) {
import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
})
}
}
2021-03-24 15:14:15 +00:00
export default reportWebVitals