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.
79
79
``` js
80
80
function onRenderCallback (
81
81
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)
83
83
actualDuration , // time spent rendering the committed update
84
84
baseDuration , // estimated time to render the entire subtree without memoization
85
85
startTime , // when React began rendering this update
@@ -95,7 +95,7 @@ Let's take a closer look at each of the props:
95
95
* ** ` id: string ` ** -
96
96
The ` id ` prop of the ` Profiler ` tree that has just committed.
97
97
This 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" ` ** -
99
99
Identifies whether the tree has just been mounted for the first time or re-rendered due to a change in props, state, or hooks.
100
100
* ** ` actualDuration: number ` ** -
101
101
Time spent rendering the ` Profiler ` and its descendants for the current update.
You can’t perform that action at this time.
0 commit comments