jamenamcinteer / react-qr-barcode-scanner

A simple React Component using the client's webcam to read barcodes.
69 stars 71 forks source link

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 2 years ago

fouad1998 commented 2 years ago

use this should solve it

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

thank fouad1998