vue-barcode-reader icon indicating copy to clipboard operation
vue-barcode-reader copied to clipboard

change codeReader to a prop, so it can be reused for multiple instances

Open HuyHHV opened this issue 2 years ago • 1 comments

If multiple instances of barcode reader are used, the loading time will be extremely long and the web page become laggy. This can be solved by declaring BrowserMultiFormatReader() in a parent component and sharing it with other barcode reader instances using prop. The codeReader also has a default value: new BrowserMultiFormatReader(), if only one barcode reader instance is used

HuyHHV avatar Jan 03 '23 06:01 HuyHHV

@HuyHHV I haven't experienced this as I use the barcode scanner as a component already. But does this "trick" really help?

teckel12 avatar Aug 14 '23 23:08 teckel12