Migrating Next app from Full SSR to hybrid SSR/SSG - When should we use "getInitialProps"? #12215
-
Since 9.3, 3 new utility functions are available. https://nextjs.org/docs/basic-features/data-fetching But I'm in the process of migrating a Next.js app that uses Also, does |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Re: using |
Beta Was this translation helpful? Give feedback.
getInitialProps
can be used still (legacy), but I believe it's preferred to usegetServerSideProps
(where the behaviors are loosely the same). As you find places where you would be able to usegetStaticProps
, that is even better.Re: using
getStaticProps
in_app
, I did a quick search and found this: #10949