diff --git a/README.md b/README.md index a646dc8..8bdf783 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ class BadInstagramCloneApp extends Component { ref={(cam) => { this.camera = cam; }} + onBarCodeRead={this.onBarCodeRead.bind(this)} style={styles.preview} aspect={Camera.constants.Aspect.fill}> [CAPTURE] @@ -127,6 +128,13 @@ class BadInstagramCloneApp extends Component { ); } + + onBarCodeRead(e) { + console.log( + "Barcode Found!", + "Type: " + e.type + "\nData: " + e.data + ); + } takePicture() { const options = {};