How can I use getInitialProps in my pages and in my _app at the same time? #15013
Unanswered
wilsongomes-swe
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.
-
Hi guys,
We are passing by some issues trying to run the getInitialProps in our custom _app.tsx and in our pages at the same time... Seems like the getInitialProps in the app overrides the page getInitialProps...
Simple page example:
Custom app example:
When I run this, it only runs the getInitialProps in the _app.tsx... The unique console log that I get is the "MyApp.getInitialProps"...
How can I configure to execute the both getInitialProp?
Thanks so much!
Let me know if you need more informations...
Beta Was this translation helpful? Give feedback.
All reactions