Home
100 Days of Code
Day 3

Data Fetching - Deep Dive

Source - Section 5 Udemy Course

Right now it is actually a bit overwhelming. This seems like the point to stop and spend some days or maybe the first two weeks. NextJS is important and while doing it I can cover a lot of fundamentals. Basically I must look to master and command the material covered in the first seven sections. This will enable me to create decent projects by my own. This is a doable goal and seems like the ideal place to spend my time. Because here I will be able to do something that will make me happy in return as I will actually be able to see myself progressing. Otherwise I will be prone to losing motivation and good vibes. And that would be far from ideal because this is what that is pushing me ahead right now.

Some points to note:

There are multiple ways to fetch data in a NextJs application. Firstly, one can fetch data from an external source using an HTTP request. Alternatively, one can also fetch data from a local source or database too. This second source is also under user's control because it will be happening on the server-side.

Therefore, we see that there are two approaches to data fetching in NextJS.

App Router

The Next.js App Router is a modern, file-system based routing solution built on React Server Components (RSCs). Introduced in Next.js 13, it is the recommended router for new applications due to its advanced features, flexibility, and performance optimizations over the older "Pages Router".
Key Features and Concepts

App Router vs Page Router