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

2024 翻墙回中国3个最佳 VPN 推荐,全部亲测可用 How to Change Location on YouTube TV in 2024 (Beginner’s Guide) Pub/Sub: Qwik Start How to Add VPN Extension in Chrome: A Simple Guide All You Need to Know About AWS Cloud Practitioner

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.