-
Notifications
You must be signed in to change notification settings - Fork 184
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
Need to import react-scan into next.js as an npm package #152
Comments
Check this one nextjs-react-scan |
I did exactly what you do, but I still only see the hover bar, and can't notice any re-rendering events. Environment: next.js 14.2.21, app router. By the way, I also import React in my layout.tsx, but it's a server-side page, so I can't use react-scan. |
Can you get this added to the front page readme. Or better yet maybe have a;
So we can just import and use; "use client";
import { useEffect } from "react";
import { scan } from "react-scan";
type Options = Parameters<typeof scan>[0];
export function ReactScan({ options }: { options: Options }) {
useEffect(() => {
scan({
...options,
enabled: true,
log: true
});
}, [options]);
return null;
} Also the |
Currently, I can load it via URL and it works fine, but not via npm package.
The best I can do is get the hover bar to appear, but there is no animation that prompts for a re-render after the component is re-rendered.
Related issue: #82
The text was updated successfully, but these errors were encountered: