-
(I'm not good english. I ask for your understanding in advanced) I have been using getInitialProps to write isomorphic code. that is many things to be aware of in order to write code that can work in both SSR and CSR, but I thought that I could move to the React(SPA) project at any time because it is code that can run in the browser However, after Nextjs 9.3+, the getInitialProps function was deprecated, and getServerSideProps and getStaticProps were added, but they seem to have a different way or intention to operate with the existing getInitialProps. getServerSideProps or getStaticProps executed only in SSR environment, there are a lot less parts to be careful compared to isomorphic code, but it seems that it cannot replace the existing getInitialProps. I hope getInitialProps stays. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's not deprecated it's still supported. Did you understand the Documentation? getInitialProps is working the client side and it makes your website so slow. getStaticProps will only render the server side. This will boost the performance of your web app... |
Beta Was this translation helpful? Give feedback.
It's not deprecated it's still supported. Did you understand the Documentation? getInitialProps is working the client side and it makes your website so slow. getStaticProps will only render the server side. This will boost the performance of your web app...