April 26, 2024
Techniques for Fetching Data: Comparing Next.js (app and pages API), Remix, and RedwoodJS
All SaaS applications involve CRUD – Creating, Reading, Updating, and Deleting.
Therefore, the way we fetch data naturally becomes a major piece of the developer experience and one of the many problems that a framework is able to solve.
Next.js app API, Next.js pages API, Remix, and RedwoodJS have all approached this problem differently, forming different opinions. Let’s look at each.
Next.js
Out of all the frameworks, Next.js offers the most options and flexibility when it comes to fetching data. The business goals for your application will determine which method you reach for. So, let’s approach it by looking at the problem you’re trying to solve.
Problem: Your pages don’t change very often. You want the fastest page load possible, with maximum SEO and OG Tag benefits.
I’d start by building static pages at build time. Next.js will try to deliver as much HTML and CSS to the browser as possible, resulting in snappy pages and happy Google crawlers.
Let’s look at some specific code examples.
First, it’s worth noting that these functions only work on the page level, when using the pages API.

Inside my pages/about.tsx file, I have some generic information for my podcast, Compressed.fm, that I want to display:
- FAQs
- Recommended episodes for getting started with our podcast
- Our most popular episodes
We rarely update this information.
