I am facing a problem of redeploying my app to retrieve updated data from my database. I do not understand. Everything works on the development side where my component renders updated data from the database. The function logs do not show the above APIs. What could be the problem.
Is vercel not allowing my api to refetch data from my database?
Hi @harryyking, welcome!
Could you provide more details about your setup? Is it a Next.js app? Are you using Static Site Generation (SSG) or Server-Side Rendering (SSR)?
- With SSG (e.g.,
getStaticProps
), data is fetched at build time, meaning updates won’t appear until you redeploy. - With SSR (e.g.,
getServerSideProps
), data is fetched on each request, ensuring your app always displays the latest data.
Solution: If you need dynamic updates without redeploying, use getServerSideProps
or a similar server-side method.