1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| import React, { Profiler } from "react";
export default function App() { const callback = ( id: any, phase: any, actualDuration: any, baseDuration: any, startTime: any, commitTime: any, interactions: any ) => { console.log("id", id); console.log("phase", phase); console.log("actualDuration", actualDuration); console.log("baseDuration", baseDuration); console.log("startTime", startTime); console.log("commitTime", commitTime); console.log("interactions", interactions); };
return ( <div> <Profiler id="hello" onRender={callback}> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </Profiler> </div> ); }
|