Skip to content

Instantly share code, notes, and snippets.

@medic-code

medic-code/qr.js

Last active Nov 1, 2020
Embed
What would you like to do?
/*export default class App extends Component {
state = ....
render() {
return (
/*{
<View style={{flex:1}}>
this.state.webview && (<WebView
source={{uri: this.state.url}}
style={{flex:1}}
scalesPageToFit={true} />
)}
{!this.state.webview && (<QRCodeScanner
onRead={this.onSuccess.bind(this)}
reactivate={true}
reactivateTimeout={4000}/>
)}*/
<TouchableOpacity
style={{
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0.2)',
borderRadius: 50,
width: 75,
height: 75,
position: 'absolute',
right: 5,
bottom: 5
}}
onPress={() => this.setState({ webview: false })}>
<Text style={{textAlign: 'center'}}>Click to Reload</Text>
</TouchableOpacity>
</View>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.