-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Devtools V4: Where is Highlight Updates? #16437
Comments
Same issue here. Highlight Updates has gone. |
https://www.reddit.com/r/reactjs/comments/cqx554/introducing_the_new_react_devtools/ex1r9nb/
Edited to add inline comment |
Some related previous discussion bvaughn/react-devtools-experimental#244 |
Highlight Updates was very useful not that much for fixing performance problems (the new Profiler is much better at that), but to discover surprising renders. It has saved us countless of times especially when working with Context where one change may cause re-renders in other parts of the app. When working on the Profiler you tend to focus on only a part of the tree, so regressions are easy to miss. I understand @gaearon 's concerns about giving the wrong idea, so how about: 1. Choose outline color based on render durationCheap renders should be green, expensive renders should be yellow or red. Or just use the exact same colors used by the Profiler. 2. Vary outline fade speedOutline fade animation should be relative to render duration. Fast renders should fade immediately, slow renders should fade more slowly. 3. Differentiate repainted areasI sometimes used
Maybe even have a setting that only flashes the first of the above (with some configurable threshold). |
Identifying a "cheap" or "fast" render is not as straight forward as it seems, because of factors like:
The nice thing about the Profiler is that it reports speed as relative, letting you focus on the slowest part of an application in any given session. (You get to decide when the slowest part is fast enough.) This can only be done in retrospect though. It also gives you a static snapshot of the commits, and which props/state changed, letting you see not only how often a particular component rendered (was it more than you expected?) but also specifically why it re-rendered, and what else re-rendered with it. I think there's a good chance we might look at adding some kind of update flashing mechanism back to DevTools as part of Profiler. Maybe it flashes (like it used to) only when profiling is active? Maybe it flashes every component that re-rendered when you select a new commit in the profiler after profiling has stopped? (I kind of like that idea, since it lets you "replay" if you missed something.) We need to experiment with it a bit and see what works best. |
I used this feature a lot to make sure that only the components that should be rendering were being rendered. I have an app that renders the same component, many times, with different id's, and I like to make sure that only the one that needs to rerender is rendering, rather than all of them. I don't see a way to check this with the new profiler. |
What have you tried? The profiler should clearly show whether one child is re-rendering or many. |
I was using 'Highlight updates' frequently. It was the feature of dev-tools that I used the most. Just to see what was updated, not how often. Sure, you can use the profiler to do this but that is considerably more cumbersome than having a quick visual indication. For me, "Highlight updates" was the "killer feature" ... |
We hear you :-) I don't think further comments just saying "I used this" are going to significantly help in this thread, for what it's worth. We know there are people using this feature, and are thinking what would be the right way to bring it back. Thanks for feedback! |
This option was an essential component for my daily working process to indicate rerender issue instantly. So i would be really glad, if you can bring this awesome feature back soon. |
+1 on bringing back some version of this feature that enables a quick high-level view of re-renders - even for re-renders that are a result of when we update context. |
As requested above:
To rephrase this more explicitly: We hear you! But if more "+1" comments are posted, we might have to lock this thread. There are many people subscribed to this repository. We don't want to spam them with the same comments every few hours. Additionally, we personally use GitHub notifications. If this thread gets bumped every day with a "+1", we'll eventually have to unsubscribe from it to reduce the noise. Which is likely the opposite of your intention. Before commenting, please make sure that you're adding something that wasn't said before. If you see a similar comment to what you wanted to write, just add a 👍 reaction to it instead. Thanks for understanding. |
I'd like to ask, is there a way to install the previous version of the extension? Actually, the update broke the flow, that I used to. Unfortunately, Chrome extension marketplace does not allow you to install the previous version like 'npm'. Do you have a link with compiled extension? Thank you.
And here is an answer, why the new extension broke my flow. Profiler encourages you to press buttons to start, then to end profiling, but it is not instant. With updates highlighter, you see everything without extra moves. It also shows you in a very intuitive way the actual updates, and what actually has been triggered. |
This reminds me of Chrome DevTools's own performance monitor which also used to be live-updating and then someday was migrated to press-to-record . That move probably made sense because of complexity and impact on performance, but the point is that it adds enormous friction (as @Carduelis points out, it's way easier not to press start/stop buttons). It throws a wrench into the OODA loop, and no doubt will affect how often users use this feature, and in turn affect the quality of the app itself. Don't take this the wrong way --- the new perf monitor is cool and has its uses when you need to dig deep, but it can't simply replace the quick & dirty visualizations like the old update highlighting. |
@Carduelis Installation instructions for the previous version of DevTools are covered in the release blog post: https://reactjs.org/blog/2019/08/15/new-react-devtools.html#how-do-i-get-the-old-version-back |
I ran in circles a bit trying to get v3 installed in Chrome from the instructions above, and just couldn't get the standalone profiler to highlight changes. So I made detailed step-by-step instructions if you just want to get it working and get back to optimizing your components: Installing React Dev Tools V3 (step-by-step instructions): If I may rant a bit, while on a technical level it may seem like "in-depth profiling tools" > "a silly highlighting feature", we are all just humans and we glean a lot of information quickly from simple visual cues, so in some ways the highlighting feature is a pretty big deal exactly for the reason that it's so easy to use. For me it's the reason I open React Dev Tools 90% of the time. |
I don't think Dan or I have debated that it's "easier to use", just that it might encourage people to invest time in "fixing" things that aren't "broken" (aka over optimizing things that aren't slow). We've seen this pattern before with things like widespread avoidance of inline functions because of feared "performance" costs. Energy invested in fixing non-problems is energy that isn't spent fixing other potentially more important things. As we said above, I think there's a good chance we might add some kind of update flashing mechanism back to DevTools as part of Profiler. Realistically it's not the highest priority thing on my plate though so I'm going to ask for patience rather than repeating this conversation. We hear and acknowledge that this feature is important. We will try to weigh convenience against the other considerations mentioned above and come up with something more than what we currently have. |
To the point about over-optimizing I can attest that the visual render highlighting can encourage that. Therefore, I'd like to add something to the discussion here. For those who miss the feature, you may find https://github.com/welldone-software/why-did-you-render more informative. This may be something to consider when this feature is implemented. By default, WhyDidYouRender does a deep value comparison and only reports when things didn't actually change between re-renders. It would be great to have this same filtering on the visual render highlights. This would direct more thoughtful optimizations (plus it is a distinction not afforded by the profiler). In theory it should be possible to rerender the entire app without performance concern so adding SCU everywhere to avoid seeing the render highlighting is a counterproductive path. I still found the rerender highlight useful for demonstrations on how React works. |
@bvaughn Well you generally only turn on the deep comparison on a single component at a time. So I agree it's not something you'd turn on for all components by default. Perhaps something where You right click that green bar and select "highlight render updates". |
@bvaughn I love the "Why did this render?" feature (in the interim while Not intuitive what the underscore means:
I only use the hooks api, but still not certain of the meaning:
Any chance of there being a sentence or two explanation for these cases and maybe others I have yet to encounter besides the obvious case where it lists actual |
Looks like something in your app is passing in a prop named
Please see #16477 |
Hi I was using Highlight Updates a lot. I'm developing a frequently refreshing app and that future was essential for me for my day to day work. I get the solution that @bvaughn presented. It's super useful but I can't apply it to my scenario couse of the refresh rate. I need a quick indication rather than profiling tool, which looks awesome BTW. Are you still going to implement this back?? If not how can I downgrade my React Dev Tools, cause I simply can't develop without it. |
Already answered by @oztune. How do I get the old version back? |
I want the old version back please. There's so much functionality that was lost in the new one and it's impossibly unhelpful |
Here's how to get the old version back, worked for me: |
HI @einarq actually I would love to have missing functionality in the new Version. I see a lot of nice new things but some of the old ones ware crucial and I do not get it the way it was removed. To check rerenders now I put a console log in render function to spot if I'm reducing a number of rerenders or not. It's not ideal but it works. The previous version was making this ridiculously easy and helpfull cause it also shows me other unneeded rerenders that I could spot. Now, this is just painful. Please put those missing functionalities back to the new version. In my word new Version means that you have: redesign and improvements of the older one and new futures added in. Not removed and added new functionality that is different than the previous one. Also why I cant now change state values ?? And props Booleans are not checkboxes anymore ?? That was so cool. And Again gone. Now state cant be change and props I have to type that false/true in instead just click and see how a component is reacting to this. Super annoying. |
Hi @PMustard, I don't work on this, I was just suggesting one potential approach to bring back the old version of the dev-tools if you don't like the new one. It worked for me. I'm sure that the team working on the dev-tools (mainly Brian Vaughn I guess?) would take your concerns into consideration if you create some separate issues for them. And don't forget to show some appreciation as well. We are getting these tools for free :) Regards, Einar |
If you urgently need this feature, you can use an old version as a workaround: https://reactjs.org/blog/2019/08/15/new-react-devtools.html#how-do-i-get-the-old-version-back. I also encourage you to try using the Profiler. Even though it’s a bit more effort to run, it tells you which re-renders are important and which are not. Just counting render numbers is often a distraction from actual performance issues. We understand that having a light way to spot unexpected rerenders is valuable. We’ve explained in #16437 (comment) that this is on our radar and that more comments saying “I need this” aren’t helpful. Since this thread has nevertheless continued gathering “I need this” comments, I’m going to lock it to reduce the notification flood. Please rest assured your voice is heard. |
I have implemented this feature in the new DevTools (#16989) with the following caveats:
|
Closing this issue now that #16989 is landing. Will likely release 4.2 with the new feature today. |
If I understood correctly, this is the correct repository for devtools v4, right?
I just noticed that react devtool were updated. I'm missing the "Highlight Updates" function.
How can I activate it?
Version: 4.0.2 (8/15/2019)
The text was updated successfully, but these errors were encountered: