Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profiling option to track why a component rendered #310

Merged
merged 10 commits into from
Jun 9, 2019

Conversation

bvaughn
Copy link
Owner

@bvaughn bvaughn commented Jun 7, 2019

I'm exploring how the Profiler UI might help answer the question: Why did re-render?

New preference added

Profiler change tracking preference

A component mounted

A component was mounted

A component updated

A component's props and state changed

* User profiling setting
* Background collects changed props/state (not added/removed or hooks yet)
* Tests updated
@bvaughn bvaughn changed the title Add profiling option to track which props/state changed for each commit [WIP] Add profiling option to track why a component rendered Jun 8, 2019
@@ -350,7 +352,7 @@ export function attach(
// The unmount operations are already significantly smaller than mount opreations though.
// This is something to keep in mind for later.
function updateComponentFilters(componentFilters: Array<ComponentFilter>) {
if (this._isProfiling) {
if (isProfiling) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not have slipped through before 😦

@bvaughn bvaughn changed the title [WIP] Add profiling option to track why a component rendered Add profiling option to track why a component rendered Jun 9, 2019
@bvaughn bvaughn merged commit b3046c6 into master Jun 9, 2019
@bvaughn bvaughn deleted the track-changed-props branch June 9, 2019 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant