5 things you didn’t know about React DevTools

If you’re into React development, chances are you’ve tried the official React DevTools. This browser extension lets you debug your components, and is available for ChromeFirefox and even as a standalone application for Safari and React Native debugging.
The React DevTools is under active development, and new features are added all of the time. This article will show you five of those features that you might not have tried out yet, or that you simply didn’t know existed! Finally, we’ll look at what the future of React DevTools will bring.

Debug performance with the profiler

In September of 2018, the React team introduced an incredibly powerful feature for debugging performance related issues: the Profiler. When used with React 16.5 or later, the React DevTools provides you with a profiling feature, which shows you a summary of how your application re-renders.
Just like the regular JavaScript profiler found in your dev tools of choice, you’ll have to “record” a set of interactions. Once you’ve done that, you’ll see a visualization of each re-render your application goes through, with accurate timing information and color-coded flame graphs. Now, it even captures screenshots of every DOM update!
Here’s the flame graph view of the Profiler
There are some great articles already written that will teach you everything there is to know about the React Profiler. The initial blog post does a great job of introducing most features, and Ekwuno Obinna’s article offers a real deep dive. I can also suggest watching Brian Vaughn’s recorded live stream, where he uses the React Profiler to locate and squash a few pesky performance bugs.

React DevTools is themable!

Are you one of those people that spend some time making your development environment look just right? Well, I have news for you! React DevTools is themable!
The theme selector is hidden behind the cog icon.
It follows your Chrome theme by default, so it’ll respect your dark mode preferences if applicable. But why stop there? The React DevTools comes pre-installed with 18 different themes, including some of the most popular themes for your favorite editors. If that’s not enough, there’s even a UI to implement your very own theme — right in the extension!

Comments

Popular posts from this blog

HOW CAN USING WORDPRESS BENEFIT YOUR BUSINESS?

Why choose React?

How do I develop a mobile apps with ReactJS?