From the course: Learning Next.js
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Search, request, and pre-render content with SSR
From the course: Learning Next.js
Search, request, and pre-render content with SSR
- So, now we are successfully making a request. So, we have followed all the steps. So, first the step which is to make an API call using this resource which is the New York Times API. Then we pre-render the data. So, this is the role of get server side props to pre-render data at request sign and the results we have it here. We're going to use the exact same source code here so that we used in order to generate statically the top stories here it's going to be the same format to display the results. So, let's check this out. We're going to make a try and search again for education. We're going to land on this here and now we've got the results. That is perfect. So now, what happened is that we were able to pre-render data based on the user's input. So, this is at request time happening between client side transitions. So, this is a good example with the search input. So, let's go back. So, this search input example…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Discovering the rendering strategies3m 51s
-
(Locked)
Discovering the rendering strategies with getStaticProps4m 17s
-
(Locked)
Pre-rendering at build time with static generation4m 32s
-
(Locked)
Pre-rendering super fast and super SEO-efficient content3m 17s
-
(Locked)
Discovering the rendering strategies with getServerSideProps4m 15s
-
(Locked)
Using dynamic routes and user's input to query content3m 51s
-
(Locked)
Search, request, and pre-render content with SSR2m 18s
-
(Locked)
Discovering the rendering strategies with getStaticPaths3m 47s
-
(Locked)
Pre-rendering at build time with static paths5m 9s
-
(Locked)
Handling errors with a fallback page (404 not found)2m 59s
-
(Locked)
Customizing an error page2m 16s
-
(Locked)
Challenge: Pre-rendering at build vs. runtime4m 25s
-
(Locked)
Solution: Pre-rendering at build vs. runtime8m 57s
-
-
-