Profiler shows which fibers scheduled an update, and why a given component rendered (do not merge) #269
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note that this PR is blocked by React PR 15658 and unit tests are expected to fail unless using a version of React built from from the
scheduler-tracking
branch.I'm exploring how the Profiler UI might help answer a few common questions:
Why did this commit happen in the first place?
This feature requires a build of react-dom from the
scheduler-tracking
branch.Here's an example that shows how batched updates will list multiple schedulers:
![why-batched](https://user-images.githubusercontent.com/29597/57799153-3fc51a80-7703-11e9-8d42-dff83f9182f0.gif)
And here's an example that illustrates both suspense (how the scheduler is continued across the ping) and how we could potentially handle a scheduler that is unmounted as a result of the udpate:
![why-suspenseKapture 2019-05-15 at 11 17 40](https://user-images.githubusercontent.com/29597/57799154-405db100-7703-11e9-8d61-8094eb1f4700.gif)
Why did component X re-render as part of it?
This is an example of how we could show what changed between renders:
![whatwhat](https://user-images.githubusercontent.com/29597/57800038-3c329300-7705-11e9-869a-80fdcd747a93.gif)
Note that hooks are tricky to handle, so for now we don't try to display what hook changed.