
The same app, built multiple times in different React frameworks for apples to apples comparisons.
React Data Fetching is a comprehensive repository designed to showcase the four primary data-fetching strategies used in modern React applications. It thoroughly examines Client-Side Rendering (CSR), Static Site Generation (SSG), Server-Side Rendering (SSR), and Streaming with React Server Components, providing real-world examples and demonstrating their trade-offs across various frameworks. Whether you are a beginner exploring the vast React ecosystem or an experienced developer looking to refine your understanding of data management in applications, this repository serves as an invaluable resource.
With implementations spanning multiple frameworks such as Next.js, Astro, and SvelteKit, this repository not only illustrates core concepts but also equips developers with the knowledge necessary to make informed decisions based on specific project needs.
Diverse Data Fetching Strategies: Covers CSR, SSG, SSR, and Streaming, allowing developers to explore different methods of data management.
Multiple Framework Implementations: Includes examples across various frameworks like Next.js, Astro, and SvelteKit to highlight differences and similarities in data fetching.
Comprehensive Readme for Each Approach: Each directory offers detailed explanations of concepts, pros and cons, and use cases, promoting a deeper understanding.
Hands-On Examples: Facilitates practical learning with runnable examples via commands like pnpm dev for easy experimentation.
Backend Integration: Comes with a simple backend using json-server, enabling straightforward setup and testing of data fetching methods.
Type-Safe Routing: Features TanStack Router for type-safe routing with built-in data loading, enhancing code reliability and performance.
Learning Resource: Ideal for both beginners and experienced developers, providing a solid foundation in data-fetching strategies in React applications.
Testing and Development Commands: Easy-to-follow commands for installing dependencies and running applications, streamlining the setup process.

Astro is the all-in-one web framework designed for speed. Pull your content from anywhere and deploy everywhere, all powered by your favorite UI components and libraries.
Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.
React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components
Remix is a modern JavaScript framework that focuses on building fast and performant web applications. It emphasizes a combination of server-rendered content and client-side interactivity, offering a robust architecture for creating scalable and maintainable projects.
TanStack is a collection of high-quality, framework-agnostic libraries including TanStack Query for data fetching, TanStack Router for routing, TanStack Table for tables, and more. These tools provide powerful, type-safe solutions for common web development challenges.