Skip to content
Discussion options

You must be logged in to vote

No, getInitialProps is not deprecated. The reason the documentation recommends using getStaticProps/getServerSideProps is because allows you fall into the pit of success.

Example: if you're only fetching data on the server-side, getServerSideProps helps you do the right thing by not including that code in the client-side bundle. Smaller bundle === faster page load times.

Hope this helps clarify!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@no-name420
Comment options

Answer selected by rafaelalmeidatk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants