# React性能扫描工具 `React` `性能优化` `开发工具` `渲染检测` # React Scan React Scan 自动检测 React 应用中的性能问题。 - 无需修改代码 —— 直接接入即可 - 精确高亮需要优化的组件 - 通过页面上的工具栏随时访问 ### 快速开始 ```bash npx -y react-scan@latest init ``` ### [**试试演示!→**](https://react-scan.million.dev) React Scan 运行效果 ## 安装 `init` 命令会自动检测你的框架,通过 npm 安装 `react-scan`,并完成项目配置。 ```bash npx -y react-scan@latest init ``` ### 手动安装 安装依赖包: ```bash npm install -D react-scan ``` 然后在应用中添加 script 标签。根据你的框架选择对应指南: #### Script 标签 在 `index.html` 中所有脚本之前粘贴以下内容: ```html ``` #### Next.js(App Router) 在 `app/layout.tsx` 中添加: ```tsx import Script from "next/script"; export default function RootLayout({ children }) { return (
``` #### Remix 在 `app/root.tsx` 中添加: ```tsx import { Links, Meta, Outlet, Scripts } from "@remix-run/react"; export default function App() { return (