When I'm using getServerSideProps with next js and it almost takes 5 or 6 seconds for the page to load . I tried using only one url to fetch and not many but again it takes alot for the page to load .
export const getServerSideProps = async (ctx) => {
let data ;
try {
data = axios.get("url")
} catch(e){
data = "error"
}
return {
data: data,
};
};
I was wondering is there any trick to speed up getServerSideProps data fetching so I could have faster initial page load ?