dashboardphilippines / react-webcam-barcode-scanner

[UNMAINTAINED -- PLEASE USE https://github.com/jamenamcinteer/react-qr-barcode-scanner INSTEAD] A simple React Component using the client's webcam to read barcodes.
45 stars 32 forks source link

Clear interval on unmount? #8

Open ashevchenko0309 opened 3 years ago

ashevchenko0309 commented 3 years ago
React.useEffect(() => {
   const interval = setInterval(capture, 100)
   return () => { clearIntrval(interval) }
  }, []);

Something like this