원래 getInitialProps 이거 쓰는데 빌드때 Warning이 계속 떠서 바꿀려고 함


각 page 컴포넌트에서 getServerSideProps를 쓰는 방법은 이제 알겠는데 _app.tsx에서도 따로 처리를 해줘야 하는 건지 모르겠음


MyApp.getInitialProps = async ({
Component,
ctx,
}: AppContext): Promise<AppInitialProps> => {
let pageProps = {};
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}
return { pageProps };
};

getInitialProps 쓸 때는 _app.tsx에서 이렇게 써놨는데

getServerSideProps는 _app.tsx에서 따로 써줄 필요가 있나 없나 모르겠네...