React プロファイラーを使用しようとしていますが、onRender メソッドがこのような場合にのみ機能します。
<Profiler id="BrowseCategories" onRender={console.log('hi')} }></Profiler>
これを行うと何も記録されません
<Profiler id="BrowseCategories" onRender={callback} }></Profiler>
これは私のコールバック関数です
const callback = (id, phase, actualTime, baseTime, startTime, commitTime) => {
console.log('******________********______')
console.log(`${id}'s ${phase} phase:`);
console.log(`Actual time: ${actualTime}`);
console.log(`Base time: ${baseTime}`);
console.log(`Start time: ${startTime}`);
console.log(`Commit time: ${commitTime}`);
console.log('******________********______')
}