Skip to content

Commit fe139b7

Browse files
authored
Add "nested-update" phase to profiler typings
"nested-update" added in facebook/react#20163
1 parent 79f5007 commit fe139b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/reference-profiler.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ It receives parameters describing what was rendered and how long it took.
7979
```js
8080
function 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`** -
9696
The `id` prop of the `Profiler` tree that has just committed.
9797
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"`** -
9999
Identifies 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`** -
101101
Time spent rendering the `Profiler` and its descendants for the current update.

0 commit comments

Comments
 (0)