Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HuyHHV
Copy link

@HuyHHV HuyHHV commented Jan 3, 2023

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

@teckel12
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants