I'm pulling data from an api and want to change the format of the date displayed. What's the best way to achieve this? Do I implement something at the point where I retrieve the data or the point where it is displayed?
import axios from 'axios'
import {popularGamesURL, upcomingGamesURL, newGamesURL} from '../api'
export const loadGames = () => async (dispatch) => {
    const popularData = await axios.get(popularGamesURL());
    const newGamesData = await axios.get(newGamesURL());
    const upcomingData = await axios.get(upcomingGamesURL());
    dispatch({
        type: "FETCH_GAMES",
        payload: {
            popular: popularData.data.date.results,
            upcoming: upcomingData.data.results,
            newGames: newGamesData.data.results,
        }
    });
};
 
     
    