📅  最后修改于: 2022-03-11 15:02:24.711000             🧑  作者: Mango
To push to the beginning of the array do it this way
this.setState( prevState => ({
userFavorites: [{id: 3, title: 'C'}, ...prevState.userFavourites]
}));