Skip to content
Discussion options

You must be logged in to vote

Hi, welcome! getInitialProps runs both on the client and server side, this caused some confusion and required extra work to make sure unnecessary code wouldn't be bundled to the client.

With the new data-fetching methods, Next.js can easily detected server-side code and remove it from the client-side bundle, check this tool: https://next-code-elimination.now.sh
The new separated methods are also important to signalize if the page should be static or server generated.

I have now implemented my routes with getServerSideProps. but I notice a delay in clicking a link and the page rendering when I navigate client-side with this setup.

Next.js won't render the new page until the response from g…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by timmysmalls
Comment options

You must be logged in to vote
8 replies
@timneutkens
Comment options

@danilockthar
Comment options

@timneutkens
Comment options

@srikanth912
Comment options

@timneutkens
Comment options

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