vue-barcode-reader
vue-barcode-reader copied to clipboard
change codeReader to a prop, so it can be reused for multiple instances
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 I haven't experienced this as I use the barcode scanner as a component already. But does this "trick" really help?