react-native-smart-toast-alert

react-native-smart-toast-alert for react native applications Android & Ios easy to use toast message.

Usage no npm install needed!

<script type="module">
  import reactNativeSmartToastAlert from 'https://cdn.skypack.dev/react-native-smart-toast-alert';
</script>

README

Thank you for installing

image example

Installation

npm i react-native-smart-toast-alert

Usage

import React from 'react';
import {View, Text, StatusBar} from 'react-native';
import Toast from 'react-native-smart-toast-alert'

export default Mycomponent = () => {
 
const showToast = () => {
  Toast.showToast('Great ! Toast is working...', '#228B22')
}

return (
    <View style={{flex: 1}}>
    <Toast /> { /*Add this line */}
    <StatusBar barStyle="light-content" />
      <Text onPress={() => showToast()}> CLICK ME </Text>
    </View>
  );
};

Props

call this method when you need to show the toast in your app

Toast.showToast(YOUR_TOAST_MESSAGE, COLOR)