I'm new to React JS. I'm trying to develop one simple web page which renders data from cloud firestore. And I'm using react-redux-firebase
to fetch the data. It is working fine. Now I want the data to be fetched from cloud functions. I have deployed the cloud functions successfully. And I can even fetch the data from cloud functions using axios
. But I want to use react-redux-firebase
. I searched a lot and couldn't find a single example. Please help me.
const firebase = getFirebase();
var animals = firebase
.functions()
.httpsCallable("getAllAnimals");
animals()
.then(result => {
console.log("result ------------- ", result)
})
.catch(error => console.log('errorrrrrrrr ' + error)
);
Using this, I'm getting the below error.
errorrrrrrrr Error: Response is missing data field.