Having a static page with dynamic props #12028
Replies: 3 comments
-
you mean everything was rendered and cached as the html file. and dynamic blocks took the state |
Beta Was this translation helpful? Give feedback.
-
Not exactly, not from the api request and no loading indicator This initial props will be delivered within the page bundle, but the html response won't have it rendered. I believe that they would only take place when the page hydrating or right after it. The goal is to have SSG file - but still being able to change the initial prop without the user waiting for additional request (as you suggested) |
Beta Was this translation helpful? Give feedback.
-
@MaxmaxmaximusGitHub have you converted it to a discussion? if so, why? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request
Is there option to have a static page (that was SSG-ed in build) but having a dynamic props for it? I'll explain my situation - I have world wide users and I want some
<select>
s to be auto selected to the user's region & currency - so I would like add the geoip data in the props. It's not a page I would like to SSR.I believe it can be pretty useful in lots of cases (mostly related to fields initialization) that the SSR is just too much
I would think that that function like
getServerSideStaticPageProps
(or something bit shorter) that tells us we can still SSG it still would let us do some processing when the request arrivesI can't think of real workaround with the current configuration. only SSR (which will increase load time) or an XHR (
fetch(..)
) request when the page starts (which will make the web page to behave weird..).cheers :)
Beta Was this translation helpful? Give feedback.
All reactions