EddieLa / JOB

A Barcode scanner capapable of reading Code128, Code93, Code39, Standard/Industrial 2 of 5, Interleaved 2 of 5, Codabar and EAN-13 barcodes in javascript.
http://eddiela.github.io/JOB
600 stars 204 forks source link

not working in react #62

Open dhana6795 opened 5 years ago

dhana6795 commented 5 years ago

i found this is available in npm and tried to use in my react app it is installed but not working, i tried this in html works well, i want to use this in react app, can @EddieLa is there any possibility that you can fix the source which is available in npm

ankurbabu commented 5 years ago

Hi @dhana6795 ,

Did you able to use the library with Reactjs?

dhana6795 commented 5 years ago

Yes, but not directly, i've added barcode reader object to window object then accessed

ankurbabu commented 5 years ago

Can you give the npm link of this project?

dhana6795 commented 5 years ago

@ankurbabu https://www.npmjs.com/package/barcode-reader

ankurbabu commented 5 years ago

@dhana6795 Thank you so much. But when I am using it in my code, I am receiving following error with Init() method "barcode_readerWEBPACK_IMPORTED_MODULE19default.a.Init is not a function". Could you please tell how did you add barcode reader object to window object and used.