You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use useRef instead of useState for QR scanner lock to prevent duplicate scans
The scannerLocked state was captured in handleQrScan's closure, so rapid
native barcode scanner callbacks before React re-renders would all see
false, bypassing the guard. Switching to a useRef ensures the lock value
is read synchronously, reliably preventing duplicate scan processing.
0 commit comments