Using React Dev Tools
As almost all developers familiar with React know, it has a lot of components which are linked with each other to from a big component tree with a lot of branches, all components have states and props being passes up and down the tree.
It can get very confusing in later stages but worry not, Facebook which is the creator of react, has a Chrome Extension which some of the people don't know of.
It adds new tabs to the Chrome developer tools, which make the complex structure of react apps a bit easy.
React Developer Tools is a Chrome DevTools extension for the open-source React JavaScript library. It allows you to inspect the React component hierarchies in the Chrome Developer Tools.
You will get two new tabs in your Chrome DevTools: "⚛️ Components" and "⚛️ Profiler".
The Components tab shows you the root React components that were rendered on the page, as well as the subcomponents that they ended up rendering.
By selecting one of the components in the tree, you can inspect and edit its current props and state in the panel on the right. In the breadcrumbs you can inspect the selected component, the component that created it, the component that created that one, and so on
Here App.js has a subcomponent of Entry which ca be seen using the dev tools
It also shows where the data is coming from and what props are there in that component
Top comments (0)