Im trying to add more than one item into this array but I'm not sure how to do so, any feedback is appreciated!
async componentDidMount() {
for (i = 0; i < this.state.permissionsResponseData.length; i++) {
if (this.state.permissionsResponseData[i].role_id === this.state.roleResponseDataID.id) {
await this.setState({
accessRoleData: this.state.permissionsResponseData[i].data
})
}
}
}
accessRoleDatathis is how im initializing itstate = { accessRoleData: []}