View difference between Paste ID: LggKjYd9 and 3t6eMttF
SHOW: | | - or go back to the newest paste.
1
export function fetchAllCars() {
2
    return (dispatch) => {
3-
        return api.getAllCars().then(result => dispatch(result.data));
3+
        return api.getAllCars().then(result => dispatch(setCarsArray(result.data)));
4
    };
5
}