getInitialProps does not pass props to component #17224
-
I have 1 page like this
And this is what I got from server log
NextJS version Anyone has an idea? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @tri-nguyen-nfq. Do you have a custom |
Beta Was this translation helpful? Give feedback.
-
Thank you @jamesmosier , you guess it right, I mess up the custom |
Beta Was this translation helpful? Give feedback.
-
In case someone comes across this in the future and is wondering what the solution is, make sure you're passing the pageProps into the returned component in // Type Imports
import type { AppProps } from 'next/app';
const AppComponent = (props: AppProps) => {
return (
<props.Component {...props.pageProps} />
);
};
export default AppComponent; |
Beta Was this translation helpful? Give feedback.
Hi @tri-nguyen-nfq. Do you have a custom
_app.js
? If so, could you share the code?