Duplicate pageContext #1696
Unanswered
marek-hanzal
asked this question in
Help & Questions
Replies: 1 comment 1 reply
-
In an SSR context it makes sense to embed the pageContext data into the HTML (saving a round trip), but indeed for pre-rendered pages it would make more sense to avoid this. It‘s on the radar although not the a priority at the moment. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This one is strange:
I've found in docs I should not use
onBeforePrerenderStart
for returningpageContext
even it would be quite cool do the same stuff in one run, so I'm using+data
....buuut.....
It get's generated twice: once as json file with
pageContext
, secondly embedded directly inhtml
file. As I'm sending static translations, this is quite ugly as for each page I would get tons of duplicate data (I get why it's generated per page, butpageContext
+ html is out of my mind :O ).Is there any reason for this behavior?
Thank you :)
Beta Was this translation helpful? Give feedback.
All reactions