So I have been working on a react native application just like the meetups app. It has its own node.js backend which can be viewed here https://github.com/rahullakhaney/meetup/tree/master/meetup-backend While in my application, I am trying to populate the groups from my database, I get this error "Possible unhandled promise rejection (id:0) null is not an object"
Here is my api.js file
import axios from axios ;
axios.defaults.baseURL = http://localhost:3000/api ;
const fakeGroupId = 58d64e3a122149dd3cdba5d8 ;
class MeetupApi {
constructor() {
this.groupId = fakeGroupId;
this.path = `/groups/${this.groupId}/meetups`;
}
async fetchGroupMeetups() {
const { data } = await axios.get(this.path);
return data.meetups;
}
}
export {
MeetupApi
};
You can also view the complete code at https://github.com/rahullakhaney/meetup/tree/master/meetup-mobile
Can anyone please explain why am I getting this error, sorry but I am new to react native.