I am using a redux reducer to add objects to a state array. This is working correctly, however, the objects are being added to the end of the array. I have searched high and low, but cannot figure out how to use this syntax, not mutate the array and add the object to the start of an array.
export default (state = [], action) => {
switch(action.type) {
case 'MOVIE_ADDED_TO_WATCHLIST':
return [
...state,
action.movie
];
}
...****rest of the reducer here****.....