Skip to content
프로젝트

KevinVandy/react-data-fetching

GitHub에서 보기

소개

동일한 앱을 여러 React 프레임워크로 반복해서 구축하여 공정하게 비교합니다.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

React Data Fetching

This repository demonstrates the four main data-fetching strategies in modern React applications: Client-Side Rendering (CSR), Static Site Generation (SSG), Server-Side Rendering (SSR), and Streaming with React Server Components. Each approach is implemented across multiple frameworks to show real-world patterns and trade-offs.

Table of Contents

Client-Side Rendering (CSR/SPAs)

Static Site Generation (SSG)

Server-Side Rendering (SSR)

HTML Streaming (RSC / Astro Server Islands)

Understanding Data-Fetching Strategies

Each directory contains a README explaining the core concepts, pros and cons, and use cases:

  • apps/1-csr/ - Client-Side Rendering: JavaScript fetches data in the browser
  • apps/2-ssg/ - Static Site Generation: Pages built at build time with data pre-fetched
  • apps/3-ssr/ - Server-Side Rendering: HTML generated on server per request
  • apps/4-streaming/ - Streaming: Progressive page delivery with React Server Components

Frameworks Covered

This repository explores data fetching across multiple meta-frameworks and libraries:

  • React Router - Client-side and server-side routing
  • Next.js - Full-stack React framework with SSG, SSR, and RSC
  • Astro - Multi-framework static site generator with server rendering
  • TanStack Router - Type-safe routing with built-in data loading
  • TanStack Start - Full-stack React framework built on TanStack Router
  • SvelteKit - bonus Full-stack Svelte framework for comparison

Getting Started

  1. Install dependencies: pnpm install
  2. Start the backend: pnpm serve (runs json-server on port 3300)
  3. Run any example app using the commands listed above
  4. Each app fetches data from the same API to demonstrate different approaches

The examples progress from basic patterns to more advanced implementations, showing how each strategy evolves with different tools and frameworks. TanStack Query (React Query) is heavily featured throughout, demonstrating how this powerful data-fetching library integrates with various meta-frameworks - from pure client-side apps to server-rendered applications with hydration, and even alongside React Server Components for optimal user experiences.

관련 프로젝트 살펴보기

불러오는 중…