Persistent Layout + Network Request #16701
Unanswered
jose-donato
asked this question in
Help
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.
-
Hello.
First of all, it is never too much to thank everyone behind this amazing framework.
I have this requirement that i need to have a persistent layout between multiple pages (it is a website for a radio, the player cannot stop when changing the page).
Also, in the layout I need to request some data from the CMS (the news' categories can change overtime so i need to query them when building).
I've seen both examples provided in the repo:
And i was thinking to do the request in getInitialProps of _app.js but that would disable Automatic Static Optimization in pages without Static Generation.
Is there any approach where without disabling automatic static optimization?
Greetings
Beta Was this translation helpful? Give feedback.
All reactions