Skip to content

Fetch messages once in a central place? (getStaticProps) #810

Answered by amannn
timohausmann asked this question in Q&A
Discussion options

You must be logged in to vote

If you use the same messages on every page and have no need for splitting, you can also fetch them via App.getInitialProps. Note that this will disable SSG, except for if you define a getStaticProps function in your pages (even if it just returns an empty object). Hope this helps!

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@timohausmann
Comment options

@amannn
Comment options

@timohausmann
Comment options

Answer selected by timohausmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants