Axios Is used For Api Calling in React-native ... Step 1. npm install axios; After installing package. import axios from "axios"; const options = { method:method // post or get headers:{'content-type':'application/json'}, data:data, url:"Apiurl", }; axios(options).then(res => { //Do something } Note If u Want to Send Form-data then change Content-type to multiformdata and pass formdata in data field in Options
Implimenting Push-notification in React-native Note: To send push notification you have to implement firebase first for implementing firebase check my previour blog 1. Install Package = @react-native-firebase/messaging, 2.FcmService.js import messaging from '@react-native-firebase/messaging' ; import { Platform } from 'react-native' ; class FCMService { register = ( onRegister , onNotification , onOpenNotification ) => { this . checkPermission ( onRegister ) this . createNotificationListeners ( onRegister , onNotification , onOpenNotification ) } registerAppWithFCM = async () => { if ( Platform . OS === 'ios' ){ await messaging (). registerDeviceForRemoteMessages (); await messaging . setAutoInitEnabled ( true ) } } checkPermission = ( onRegister ) => {