this.props.onGetReq(user, lastDate).then(result => {
this.setState({
requests: [...requests, ...result],
trigger: true,
lastDate: result[4]._data.datetime
});
})
lastDate: result[4]._data.datetime
const lastElement = array[array.length - 1];
const lastElement = [...array].pop();
const lastElement = array.slice(-1).pop();
const lastElement = array.slice(-1)[0];
const lastElement = array.pop();