DEV Community

skptricks
skptricks

Posted on

How to Show Toast Message in React Native for Android Only

Source : How to Show Toast Message in React Native for Android Only

This tutorial explains how to generate toast message in react native application. React Native Toast is a component which is related to Android only and can be used to display information for the short period of time. A Toast contains the message to be displayed quickly and disappears after some time.

NOTE : React Native Toast is only for those who are targetting to Android platform only IOS doesn’t support Toast.

Code Snippet To Use Toast Message In React Native :
ToastAndroid.show(message, duration)
ToastAndroid.showWithGravity(message, duration, gravity)
ToastAndroid.showWithGravityAndOffset(message, duration, gravity, xOffset, yOffset)

Click here to read more

Top comments (0)