Skip to content

Instantly share code, notes, and snippets.

@ShaileshPrajapati-BTC
Last active April 7, 2018 07:34
Show Gist options
  • Save ShaileshPrajapati-BTC/251c4934791c4f9a932d8f7c786287a5 to your computer and use it in GitHub Desktop.
Save ShaileshPrajapati-BTC/251c4934791c4f9a932d8f7c786287a5 to your computer and use it in GitHub Desktop.
import React,{Component} from 'react';
import {
View,
Button
} from 'react-native';
import ToastModule from 'react-native-android-toast';
export default class ToastDemo extends Component {
showToast = () =>{
ToastModule.show("Hello World");
}
render() {
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Button onPress={showToast} title= "Clike Me" />
</View>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment