awesome-compose/react-nginx/src/reportWebVitals.js
Phạm Hồng Thái 263ba37b97
add react-nginx (#121)
add react-nginx

Signed-off-by: phamthainb <phamthai4643@gmail.com>
2021-10-10 17:19:58 +02:00

14 lines
362 B
JavaScript
Executable File

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;