# Next.js가 필요한 순간

Part 1을 통해 [Next.js가 필요한 이유](https://app.gitbook.com/s/zxzdAZGtn510qj71tXJk/next.js-1/next.js#next.js)를 이미 살펴봤습니다. 아래와 같은 이유였죠.

* 직관적인 파일 시스템 기반 라우팅 시스템
* 페이지 단위의 사전 렌더링(Pre-rendering), 정적 생성(SSG), 서버 사이드 렌더링(SSR)
* 빠른 페이지 로딩을 위한 자동 코드 분할
* 최적화된 프리페칭(prefetching)을 통한 클라이언트 사이드 라우팅
* 빠른 새로고침을 지원하는 개발 환경
* 서버리스 함수로 API 엔드포인트를 구축할 수 있는 API 라우팅

아마 기존에 진행 중이던 프로젝트에서 위와 같은 장점을 얻기 위해 Next.js로의 마이그레이션을 계획하고 계실지도 모릅니다. 이번 Part 2에서는 React 프로젝트를 Next.js로 마이그레이션 하는 과정을 다뤄봅니다.

React는 18 버전을 사용합니다. Next.js 14 버전으로 마이그레이션합니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.hajoeun.dev/friendly-next-js/part-2/next.js.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
