Load data in _document.ts
via API request
#39681
Unanswered
jhancock532
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've made a code snippet for if you have to use an API request to set a html
lang
attribute or similar.This isn't a great idea if you're running a server side rendered app I think, as now you've got an API call pausing your page load before all your other API calls are sent (this is just an observation from using
next dev
). Would the above code be suitable for static sites with ISR?Beta Was this translation helpful? Give feedback.
All reactions