With the QrReader
component from react-qr-scanner
library, scanning a user’s wallet QR code is straightforward.
We first make sure that the QR reader can be open and closed in the UI. Then using the onScan
prop on QrReader
, we get the wallet address from the QR code and add it to local state.