Eric Burel @ericburel.tech · Feb 22

First, some cleanup. I've figured that I need to get roughly the same data in "getStaticPaths", and outside of it to get the actual data for a path, because getting the paths vs rendering are separate process even if the code lives in one file => I need to craft a reusable function

0 likes 1 replies

?

Replies

Eric Burel · Feb 22

I've crafted a separate file "src/fetcher/surveyWithSitemap", so I can import it and use it in getStaticPaths safely, and again in the actual page to get the data I am using an "astro" prefix in the function name: this way I can tell exactly which functions returns data that are safe to render!