diff options
author | redcreeper14385 <mounderfod@gmail.com> | 2021-11-18 15:54:04 +0000 |
---|---|---|
committer | redcreeper14385 <mounderfod@gmail.com> | 2021-11-18 15:54:04 +0000 |
commit | 328d355f83d395037e5453f5a10a2290b1975774 (patch) | |
tree | 0ad19c8b400be2aca2d145ad390deaf778adb243 /src/reportWebVitals.js | |
download | facere-cito-328d355f83d395037e5453f5a10a2290b1975774.tar.gz |
Initialize project using Create React App
Diffstat (limited to 'src/reportWebVitals.js')
-rw-r--r-- | src/reportWebVitals.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js new file mode 100644 index 0000000..5253d3a --- /dev/null +++ b/src/reportWebVitals.js @@ -0,0 +1,13 @@ +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; |