I'm building an ecommerce shop in Nextjs and (headless) Shopify. I want all my pages to be statically generated. For that I use getStaticProps & getStaticPaths (of course) where I mainly fetch product data from the Shopify API. I'm having a lot of pages where the product data is needed or at least part of it: product overview, collection pages, filter pages, product detail page an so on.
Now I wonder if I should do this API call (getting all products) only once and store it somewhere:
Could I handle it (3000 products) as a global state using recoil or something similar? But I want this state only on server side.