I am having trouble pushing data to the variable this.organizationIDList
. I keep getting an error saying it is undefined. Can someone provide me with guidance on how to properly push data to this variable?
class NewsScreen extends React.Component {
render() {
this.organizationIDList = [];
this.organizations.forEach(function (organization) {
this.organizationIDList.push(organization.id);
});
}
}