Skip to content
Discussion options

You must be logged in to vote

Hi @avaguerrero. For site wide data, using _app.js is recommended. _document's getInitialProps is only executed on the server so utilizing _app would be better to ensure you get the correct slug as well as allowing it to execute both on the server and client (depending on how you navigated to a page).

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by avaguerrero
Comment options

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

@avaguerrero
Comment options

@jamesmosier
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants