Important Properties in context of getServerSideProps
Params -> for dynamic parameters.
request -> to view the request from the client.
response -> to set the response for the client.
query -> to get hold of the query parameter hit in the url.
What happens at build time?
- There is a lambda-symbol against the pages which are server-side-rendered.
- This symbol states that this page renders at run-time.
- Also there are no json or html files formed in the app during build.
- Even after the 1st request the above files are not generated because SSR is basically dependent on run-time requests.
- Also the problem of stale data is solved as when we refresh the application, the latest data is fetched without the need for a validate key.
Top comments (0)