When I'm in development mode through npm run dev
, asyncData always calls an API and updates my page with the latest information whether it is server-side rendered or client-side rendered. However, after I run npm run generate
and deploy my site to S3, the page only displays the latest information when I navigate to the route from the client side. If I refresh the page to force a server render, asyncData does not update the page with new information. Is this by design? What would be the proper way to always force the API to be called from a static site? Should the API call also take place in a life cycle hook when it is server rendered?