GEIPL
Example to Send WhatsApp Message from React Native App
This is an Example to Send WhatsApp Message from React Native App. This post can be very helpful for you if you want to add the sharing facility into your app if you have seen our last post on React Native Share API to Share TextInput message you can see that it was providing all the possible solution available in the device to share the input text but what if you just want to share the content on WhatsApp? So for that, we have made this post to share the content on WhatsApp.
To Send WhatsApp Message from React Native App
Linking.openURL('whatsapp://send?text=' + this.state.msg + '&phone=91' + this.state.mobile_no);
To Make a React Native App
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
Code
To Run the React Native App
Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running (macOS only)
react-native run-ios


Hope you liked it.
Thanks..