NextJS – getServerSideProps

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 u…


This content originally appeared on DEV Community and was authored by FatimaAlam1234

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.

Image description

What happens at build time?

  1. There is a lambda-symbol against the pages which are server-side-rendered.
  2. This symbol states that this page renders at run-time.
  3. Also there are no json or html files formed in the app during build.
  4. Even after the 1st request the above files are not generated because SSR is basically dependent on run-time requests.
  5. 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.


This content originally appeared on DEV Community and was authored by FatimaAlam1234


Print Share Comment Cite Upload Translate Updates
APA

FatimaAlam1234 | Sciencx (2024-06-22T13:17:59+00:00) NextJS – getServerSideProps. Retrieved from https://www.scien.cx/2024/06/22/nextjs-getserversideprops/

MLA
" » NextJS – getServerSideProps." FatimaAlam1234 | Sciencx - Saturday June 22, 2024, https://www.scien.cx/2024/06/22/nextjs-getserversideprops/
HARVARD
FatimaAlam1234 | Sciencx Saturday June 22, 2024 » NextJS – getServerSideProps., viewed ,<https://www.scien.cx/2024/06/22/nextjs-getserversideprops/>
VANCOUVER
FatimaAlam1234 | Sciencx - » NextJS – getServerSideProps. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/22/nextjs-getserversideprops/
CHICAGO
" » NextJS – getServerSideProps." FatimaAlam1234 | Sciencx - Accessed . https://www.scien.cx/2024/06/22/nextjs-getserversideprops/
IEEE
" » NextJS – getServerSideProps." FatimaAlam1234 | Sciencx [Online]. Available: https://www.scien.cx/2024/06/22/nextjs-getserversideprops/. [Accessed: ]
rf:citation
» NextJS – getServerSideProps | FatimaAlam1234 | Sciencx | https://www.scien.cx/2024/06/22/nextjs-getserversideprops/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.