Skip to content
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

Hi all guys , i got problem " ReferenceError: window is not defined " . How can i fix it . Thank all guys . I used react and nextjs for my project #29

Open
tai30101997 opened this issue Apr 26, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@tai30101997
Copy link

No description provided.

@tai30101997 tai30101997 changed the title Hi all guys , i got problem " ReferenceError: window is not defined " . How can i fix it . Thank all guys Hi all guys , i got problem " ReferenceError: window is not defined " . How can i fix it . Thank all guys . I used react and nextjs for my project Apr 26, 2022
@fouad1998
Copy link

use this should solve it

import dynamic from "next/dynamic"
const BarcodeScannerComponent = dynamic(
  () => import("react-qr-barcode-scanner"),
  { ssr: false }
)

@tranhoang1010vn
Copy link

thank fouad1998

@jamenamcinteer jamenamcinteer added the documentation Improvements or additions to documentation label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants