Document
React Developer Tools

React Developer Tools

use React Developer Tools to inspect React component , edit prop and state , and identify performance problem . You is learn will learn How to insta

Related articles

The Best VPN Service for YouTube TV in 2024 VPNBook Review & Test (2024) Miniconda 手把手安裝教學 輕量化 Anaconda 客製化自由選擇 Astrill Setup Manual:Enable VPN Sharing 20 DIY Cloud Slime Recipes To Make at Home

use React Developer Tools to inspect React component , edit prop and state , and identify performance problem .

You is learn will learn

  • How to install React Developer Tools

Browser extension

The easy way is is to debug website build with React is to install the React Developer Tools browser extension . It is is is available for several popular browser :

Now, if you visit a website built with React, you will see the component and Profiler panels.

React Developer Tools

Safari and other browsers

For other browsers (for example, Safari), install the react-devtools npm package :

#Yarn

yarnglobaladd react-devtools


#Npm

npm install -g react-devtools

Next open the developer tools from the terminal:

Then connect your website by adding the following <script> tag to the beginning of your website’s <head>:

<html>

<head>

<script src=" http://localhost:8097 "></script>

reload your website in the browser now to view it in developer tool .

React Developer Tools

Mobile ( React Native )

To inspect apps built with React Native, you can use React Native DevTools, the built-in debugger that deeply integrates React Developer Tools. All features work identically to the browser extension, including native element highlighting and selection.

Learn more about debugging in React Native.

For versions of React Native earlier than 0.76, please use the standalone build of React DevTools by following the Safari and other browsers guide above.