Fetching The Data
In this episode we are going to learn about getServerSideProps() async function in which we are going to fetch our data, and Server Side Render it.
I’m also going to show you how to use .env
file to setup global variables that you can use throughout your application, be it on your production environment or development environment. That .env
file is going to hold address to our API that we are going to access through getServerSideProps()
so that we can SSR our pages, on user request.
After we fetch our data, I’m going to show you how to display it through a Card component, and then style it a little bit so that it looks nice.