GetInitialProps is asynchronous and won鈥檛 block the main thread. However if your code inside of getInitialProps is blocking the main thread it will actually block. Fetches are also asynchronous though!
This question is very general but if it helps IO like making an API request is offloaded to https://github.com/libuv/libuv and handled asynchronously so node.js is capable to proceed with work while the request is in flight. This does not change the fact that node.js runs all your code synchronously.
Awesome, just what I needed! Thanks for the quick response guys.
Most helpful comment
This question is very general but if it helps IO like making an API request is offloaded to https://github.com/libuv/libuv and handled asynchronously so node.js is capable to proceed with work while the request is in flight. This does not change the fact that node.js runs all your code synchronously.