From 3b02f828ff2a4f9d2846f077e442b8a405e2eb04 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Wed, 11 Dec 2024 17:38:13 +0000 Subject: [PATCH 1/2] Update React DevTools docs to reference RN DevTools (#7355) --- src/content/learn/react-developer-tools.md | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/content/learn/react-developer-tools.md b/src/content/learn/react-developer-tools.md index 89208a6bb1..9202d8412c 100644 --- a/src/content/learn/react-developer-tools.md +++ b/src/content/learn/react-developer-tools.md @@ -53,24 +53,9 @@ Reload your website in the browser now to view it in developer tools. ![React Developer Tools standalone](/images/docs/react-devtools-standalone.png) ## Mobile (React Native) {/*mobile-react-native*/} -React Developer Tools can be used to inspect apps built with [React Native](https://reactnative.dev/) as well. -The easiest way to use React Developer Tools is to install it globally: -```bash -# Yarn -yarn global add react-devtools - -# Npm -npm install -g react-devtools -``` - -Next open the developer tools from the terminal. -```bash -react-devtools -``` - -It should connect to any local React Native app that's running. +To inspect apps built with [React Native](https://reactnative.dev/), you can use [React Native DevTools](https://reactnative.dev/docs/debugging/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. -> Try reloading the app if developer tools doesn't connect after a few seconds. +[Learn more about debugging in React Native.](https://reactnative.dev/docs/debugging) -[Learn more about debugging React Native.](https://reactnative.dev/docs/debugging) +> For versions of React Native earlier than 0.76, please use the standalone build of React DevTools by following the [Safari and other browsers](#safari-and-other-browsers) guide above. From 0a96fa54e12da45866f6accbb019216385870e1d Mon Sep 17 00:00:00 2001 From: Xleine Date: Thu, 12 Dec 2024 10:02:56 +0800 Subject: [PATCH 2/2] fix conflict & translate --- src/content/learn/react-developer-tools.md | 31 +++------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/content/learn/react-developer-tools.md b/src/content/learn/react-developer-tools.md index 348fbc8f7f..09d203c735 100644 --- a/src/content/learn/react-developer-tools.md +++ b/src/content/learn/react-developer-tools.md @@ -52,35 +52,12 @@ react-devtools 现在在浏览器里刷新你的网站,你可以在开发者工具里查看它。 -![React Developer Tools standalone](/images/docs/react-devtools-standalone.png) +![独立的 React Developer Tools](/images/docs/react-devtools-standalone.png) -<<<<<<< HEAD ## 移动端(React Native) {/*mobile-react-native*/} -React 开发者工具同样可检查用 [React Native](https://reactnative.dev/) 构建的应用程序。 -使用 React 开发者工具最简单的办法就是全局安装它: -```bash -# Yarn -yarn global add react-devtools -======= -## Mobile (React Native) {/*mobile-react-native*/} - -To inspect apps built with [React Native](https://reactnative.dev/), you can use [React Native DevTools](https://reactnative.dev/docs/debugging/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. ->>>>>>> 3b02f828ff2a4f9d2846f077e442b8a405e2eb04 - -[Learn more about debugging in React Native.](https://reactnative.dev/docs/debugging) - -<<<<<<< HEAD -接下来从终端打开开发者工具: -```bash -react-devtools -``` - -它应该可以连接到任何正在运行的本地 React Native 应用程序。 - -> 如果几秒钟后开发者工具未连接,请尝试重新加载应用程序。 +你可以使用 [React Native DevTools](https://reactnative.dev/docs/debugging/react-native-devtools) 来检查 [React Native](https://reactnative.dev/) 应用程序,它的内置调试器与 React Developer Tools 进行了深度集成。所有功能与浏览器扩展的工作方式相同,包括本机元素突出显示和选择。 [了解有关调试 React Native 的更多信息](https://reactnative.dev/docs/debugging)。 -======= -> For versions of React Native earlier than 0.76, please use the standalone build of React DevTools by following the [Safari and other browsers](#safari-and-other-browsers) guide above. ->>>>>>> 3b02f828ff2a4f9d2846f077e442b8a405e2eb04 + +> 对于 React Native 0.76 之前的版本,请按照上面的 [Safari and other browsers](#safari-and-other-browsers) 指南独立构建 React DevTools。 \ No newline at end of file