aidenybai / aidenybai/react-scan

React scan not working in Firefox (NPM and CDN)

Offen
#400 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
21.8k
Forks
390
Ø Merge
23 Min.
Gemergte PRs (30 T.)
1

Beschreibung

Hi,

I'm encountering an issue where `react-scan` does not work in **Firefox**, although it functions correctly in all other major browsers (e.g., Chrome, Edge).

### Details:

* I’ve tested using both the **NPM package** and the **CDN URL**.
* In Firefox:
* The script appears to load correctly (verified via the browser’s inspector).
* However, nothing happens no logs, errors, or messages appear in the console.
* The expected behavior from `react-scan` does not occur.
* In other browsers:
* Everything works as expected.
* Console output appears, and `react-scan` performs correctly.
* The project is private, so I can't share the code.

> [https://react-scan.com/](https://react-scan.com/) I see that react scan is working on this page in Firefox.

### Steps to Reproduce:

1. Load a basic `NextJS` page using `react-scan` (via NPM or CDN).
2. Open the page in Firefox.
3. Observe the lack of behavior or logs.
4. Test the same page in Chrome/Edge, functionality is normal.

### Environment:

* **Firefox Version:** `140.0.4 (aarch64)` (with only `React Developer Tools` extension)
* **react-scan Version:** `0.4.3 (NPM)`, In CDN Latest
* **OS:** `Mac OS 15.3`

### Example Codes:

**Loading via CDN:**

```tsx
import Script from 'next/script';

const ReactScan = () => (

);

export default ReactScan;
```

**Loading via NPM Package:**

```
"react": "^19.1.0",
"react-dom": "^19.1.0",
"next": "^15.3.3",
"react-scan": "^0.4.3"
```

```tsx
'use client';

import { JSX, useEffect } from 'react';
import { scan } from 'react-scan';

const ReactScan = (): JSX.Element => {
useEffect(() => {
scan({
enabled: true,
showToolbar: true,
animationSpeed: 'off',
showFPS: true,
showNotificationCount: true,
allowInIframe: true,
});
}, []);

return <></>;
};

export default ReactScan;

```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.