Posted By: Anonymous
a quick NextJS Question -> Why does getInitialProps is running when a page is being redirected to (using Router.push Router.replace for example), but isn’t running on a page refresh? What’s the rational behind this?
- I’m using a bit old NextJS version -> 6.12.0
For the initial page load, getInitialProps will execute on the server
only. getInitialProps will only be executed on the client when
navigating to a different route via the next/link component or by
This means it’ll be invoked in Initial Page Load -Refreshes Apply- where it get’s executed in the server side, not the client side. As from