Skip to content

Commit 5a6e7ab

Browse files
committed
add note in webvitals
1 parent 3fd5253 commit 5a6e7ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/react-client/src/reportWebVitals.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { ReportHandler } from 'web-vitals';
22

3+
/**
4+
* getXXX() has been renamed to onXXX() in v3.
5+
*
6+
* Refer here https://www.npmjs.com/package/web-vitals
7+
*/
8+
39
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
410
if (onPerfEntry && onPerfEntry instanceof Function) {
511
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {

0 commit comments

Comments
 (0)