aidenybai / aidenybai/react-scan

React Scan ran into a problem Cannot read properties of undefined (reading '__H')

未关闭
#373 6 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
21.8k
派生
390
平均合并
23 分钟
30 天内合并 PR
1

描述

**Title**: `
React Scan ran into a problem
Cannot read properties of undefined (reading '__H')`

**Body**:

I'm following the docs exactly using the `` component method with Next.js App Router.

**Steps:**
1. Created the client component:

```tsx
"use client";
import { scan } from "react-scan";
import { useEffect } from "react";

export function ReactScan() {
useEffect(() => {
scan({ enabled: true });
}, []);

return null;
}
````

2. Imported it at the top of `app/layout.tsx`:

```tsx
import { ReactScan } from "./ReactScan"; // top-most import

export default function RootLayout({ children }) {
return (


{children}

);
}
```

But I still get this error at runtime:

Cannot read properties of undefined (reading '__H')
```

**Env:**

* Next.js 15.3.1 (App Router)
* React 18.3.1
* react-scan 0.3.3
* Node 18
```
Any idea what's wrong?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。