i am integrating salesforce with react native for the first time, I am using forcereact command. I want to popup soup through REST API, I referred this link but they have mentioned only hybrid apps and native apps.
Can anyone guide me how I can call REST API. For example in following function I want to call REST API
function syncUpContacts() {
if (syncInFlight) {
console.log("Not starting syncUp - sync already in fligtht");
return Promise.resolve();
}
console.log("Starting syncUp");
syncInFlight = true;
const fieldlist = [
"FirstName",
"LastName",
"Title",
"Email",
"MobilePhone",
"Department",
];
return syncUp(false, {}, "contacts", {
mergeMode: mobilesync.MERGE_MODE.OVERWRITE,
fieldlist,
}).then(() => {
console.log("syncUp completed or failed");
syncInFlight = false;
emitSmartStoreChanged();
});
}