How to wait for page to load before rendering #302
-
I believe my answer is use triggerOnSSRAppRendered, but I'm not clear on how to use this to signify to the ssg build that the page is ready for rendering. For my build, I am building a list of blog links from api, and then passing a modified routes array through an exported includedRoutes function. My problem is the build process doesn't wait for each route to load content from API before rendering/saving the html. In the past, with success I've used prerenderSpaPlugin and an option called renderAfterDocumentEvent that does what I need, I'm hopeful there is a way to implement similar control? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to solve this by refactoring to use suspense and making my async fetch calls from the setup function |
Beta Was this translation helpful? Give feedback.
I was able to solve this by refactoring to use suspense and making my async fetch calls from the setup function