Error: Circular structure in "getInitialProps" with Custom _app.js #15072
-
I have a custom
Now I do have this component with dynamic parameter
Am I getting Any help? How can I freely use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Inside your MyApp.getInitialProps = async ({ Component, ctx }) {
let pageProps = {};
if (Component.getInitialProps) {
// call the current component's getInitialProps
pageProps = await Component.getInitialProps(ctx);
}
return { pageProps };
} |
Beta Was this translation helpful? Give feedback.
Inside your
_app.js
getInitialProps
, you need to call the componentsgetInitialprops
viaComponent.getInitialProps(ctx);