mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
[DevTools][Timeline Profiler] Component Stacks Backend (#24776)
This PR adds a component stack field to the `schedule-state-update` event. The algorithm is as follows: * During profiling, whenever a state update happens collect the parents of the fiber that caused the state update and store it in a map * After profiling finishes, post process the `schedule-state-update` event and using the parent fibers, generate the component stack by using`describeFiber`, a function that uses error throwing to get the location of the component by calling the component without props. --- Co-authored-by: Blake Friedman <blake.friedman@gmail.com>
This commit is contained in:
1 parent
cf665c4b73
commit
9abe745aa7
7 files changed
+167
-3
No files matched your search
@@ -21,7 +21,7 @@ import {
|
||||
describeClassComponentFrame,
|
||||
} from './DevToolsComponentStackFrame';
|
||||
|
||||
function describeFiber(
|
||||
export function describeFiber(
|
||||
workTagMap: WorkTagMap,
|
||||
workInProgress: Fiber,
|
||||
currentDispatcherRef: CurrentDispatcherRef,
|
||||
|
||||
Reference in new issue
Block a user