-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does not display re-render when react-compiler
+ memo
is used
#229
Comments
Hey did you use the script tag or? how do you use it? |
I don't remember exactly at the time of testing, but I have it now: 'use client';
import { useEffect } from 'react';
import { scan } from 'react-scan';
export const ReactScan = () => {
useEffect(() => {
scan({
enabled: process.env.NODE_ENV === 'development',
log: false,
});
}, []);
return null;
}; |
@MrOxMasTer Try putting the |
I'm using next.js (app router). How can I do this? |
I just don't want to download the package every time before each render, so I installed the npm package. This is to the way you suggest (via script) for the next.js app router |
// Your ReactScan component file
- import { useEffect } from 'react';
import { scan } from 'react-scan';
+ import { useEffect } from 'react'; and when you import your |
Kind of trying to replicate the same scenario that led to this breakdown, but now no matter how I import, everything works fine. Ok, I'll hope that it's really fixed this way (by changing the import order) |
Does not display re-render:
https://github.com/user-attachments/assets/e8fe1054-cd5b-4ff1-9f6b-abef7f6847cc
Code:
https://codesandbox.io/p/devbox/xwdywd
The text was updated successfully, but these errors were encountered: