From 77554192151cf4125b7745275836375054cf6d4b Mon Sep 17 00:00:00 2001 From: superyarik Date: Thu, 8 Jun 2017 15:43:22 +0300 Subject: [PATCH] Create README.md Add onBarCodeRead example --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index a646dc89a..8bdf78333 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 = {};