File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ It receives parameters describing what was rendered and how long it took.
7979``` js
8080function onRenderCallback (
8181 id , // the "id" prop of the Profiler tree that has just committed
82- phase , // either "mount" (if the tree just mounted) or "update" (if it re-rendered)
82+ phase , // either "mount" (if the tree just mounted) or "update" | "nested-update" (if it re-rendered)
8383 actualDuration , // time spent rendering the committed update
8484 baseDuration , // estimated time to render the entire subtree without memoization
8585 startTime , // when React began rendering this update
@@ -95,7 +95,7 @@ Let's take a closer look at each of the props:
9595* ** ` id: string ` ** -
9696The ` id ` prop of the ` Profiler ` tree that has just committed.
9797This can be used to identify which part of the tree was committed if you are using multiple profilers.
98- * ** ` phase: "mount" | "update" ` ** -
98+ * ** ` phase: "mount" | "update" | "nested-update" ` ** -
9999Identifies whether the tree has just been mounted for the first time or re-rendered due to a change in props, state, or hooks.
100100* ** ` actualDuration: number ` ** -
101101Time spent rendering the ` Profiler ` and its descendants for the current update.
You can’t perform that action at this time.
0 commit comments