From the course: React: Software Architecture

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

When should we load data?

When should we load data?

- [Presenter] Okay, so the next topic we're going to take a look at, is the topic of data loading. And to make things interesting, we're going to look at how data loading works with regards to server-side rendered applications. So, first of all, we're going to want to open up the code at the point that it was at, at the end of the chapter about server-side rendering, right? After we added styled components and all that. If you don't have this, feel free to open up the starting state of the exercise files, and make sure you run npm install to install the dependencies. So, with server-side rendering when we talk about data loading, things can get pretty interesting, and to show you what I mean, let's add some articles to our server that our articles page here can load. So, here's what we're going to do. We're going to open up our server.js file, and we're going to add a special API route that our front-end will…

Contents