Start a New React Project새 React 프로젝트 시작하기

If you want to build a new app or a new website fully with React, we recommend picking one of the React-powered frameworks popular in the community. 새 앱이나 새 웹사이트를 React로 완전히 구축하려면 커뮤니티에서 인기 있는 React 기반 프레임워크 중 하나를 선택하는 것이 좋습니다.

You can use React without a framework, however we’ve found that most apps and sites eventually build solutions to common problems such as code-splitting, routing, data fetching, and generating HTML. These problems are common to all UI libraries, not just React. 프레임워크 없이도 React를 사용할 수 있지만, 대부분의 앱과 사이트는 결국 코드 분할, 라우팅, 데이터 불러오기, HTML 생성 등의 일반적인 문제에 대한 솔루션을 구축하는 것으로 나타났습니다. 이러한 문제는 React뿐만 아니라 모든 UI 라이브러리에서 공통적으로 발생합니다.

By starting with a framework, you can get started with React quickly, and avoid essentially building your own framework later. 프레임워크로 시작하면 React를 빠르게 시작할 수 있고, 나중에 자체 프레임워크를 구축하는 것을 피할 수 있습니다.

Deep Dive | 심층 탐구

Can I use React without a framework?프레임워크 없이 React를 사용할 수 있나요?

You can definitely use React without a framework—that’s how you’d use React for a part of your page. However, if you’re building a new app or a site fully with React, we recommend using a framework. 페이지 일부에 React를 사용하는 방식으로 프레임워크 없이도 React를 사용할 수 있습니다. 하지만 새 앱이나 사이트를 완전히 React로 구축하는 경우에는 프레임워크를 사용하는 것이 좋습니다.

Here’s why. 그 이유는 다음과 같습니다.

Even if you don’t need routing or data fetching at first, you’ll likely want to add some libraries for them. As your JavaScript bundle grows with every new feature, you might have to figure out how to split code for every route individually. As your data fetching needs get more complex, you are likely to encounter server-client network waterfalls that make your app feel very slow. As your audience includes more users with poor network conditions and low-end devices, you might need to generate HTML from your components to display content early—either on the server, or during the build time. Changing your setup to run some of your code on the server or during the build can be very tricky. 처음에는 routing이나 데이터 페칭이 필요하지 않더라도 이를 위한 라이브러리를 추가하고싶을 것입니다. 새로운 기능이 추가될 때마다 JavaScript 번들이 증가함에 따라 모든 경로에 대한 코드를 개별적으로 분할하는 방법을 찾아야 할 수 있습니다. 데이터 페칭의 요구사항이 복잡해지면 서버-클라이언트 네트워크 워터폴이 발생하여 앱이 매우 느리게 느껴질 수 있습니다. 네트워크 상태가 좋지않은 사용자나 저사양기기를 사용하는 사용자가 대상에 더 많이 포함되므로 서버 또는 빌드 시간 중에 컨텐츠를 우선적으로 표시하기 위해 컴포넌트에서 HTML을 생성해야 할 수 있습니다. 서버 또는 빌드 중에 일부 코드를 실행하도록 설정을 변경하는 것은 매우 까다로울 수 있습니다.

These problems are not React-specific. This is why Svelte has SvelteKit, Vue has Nuxt, and so on. To solve these problems on your own, you’ll need to integrate your bundler with your router and with your data fetching library. It’s not hard to get an initial setup working, but there are a lot of subtleties involved in making an app that loads quickly even as it grows over time. You’ll want to send down the minimal amount of app code but do so in a single client–server roundtrip, in parallel with any data required for the page. You’ll likely want the page to be interactive before your JavaScript code even runs, to support progressive enhancement. You may want to generate a folder of fully static HTML files for your marketing pages that can be hosted anywhere and still work with JavaScript disabled. Building these capabilities yourself takes real work. 이러한 문제는 React에만 국한된 것이 아닙니다. 이것은 Svelte에 SvelteKit이 있고, Vue에 Nuxt가 있는 이유입니다. 이러한 문제를 해결하려면 번들러를 라우터 및 데이터 페칭 라이브러리와 통합해야합니다. 초기 설정은 어렵지 않지만 시간이 지나면서 앱이 커져도 빠르게 로드되는 앱을 만드는 데에는 미묘한 차이가 있습니다. 최소한의 앱의 코드를 전송하면서 페이지에 필요한 모든 데이터와 함께 클라이언트-서버를 한 번으로 전송하는 방법이 좋습니다. 당신은 점진적인 개선을 지원하기 위해 JavaScript 코드가 실행하기 전에 페이지가 인터랙티브하게 표시되기를 원할 것입니다. 어디서나 호스팅이 가능하며 JavaScript가 비활성화한 상태에서도 작동하는 마케팅 페이지용 정적 HTML폴더를 생성하고 싶을 수 있습니다. 이런 기능을 직접 구축한다면 상당한 노력이 필요합니다.

React frameworks on this page solve problems like these by default, with no extra work from your side. They let you start very lean and then scale your app with your needs. Each React framework has a community, so finding answers to questions and upgrading tooling is easier. Frameworks also give structure to your code, helping you and others retain context and skills between different projects. Conversely, with a custom setup it’s easier to get stuck on unsupported dependency versions, and you’ll essentially end up creating your own framework—albeit one with no community or upgrade path (and if it’s anything like the ones we’ve made in the past, more haphazardly designed). 이 페이지의 React 프레임워크는 사용자가 추가작업을 하지 않아도 기본적으로 같은 문제를 해결합니다. 매우 간결하게 시작한 다음, 필요에 따라 앱을 확장할 수도 있습니다. 각 React 프레임워크에는 커뮤니티가 있으며 질문에 대한 답을 찾고 툴을 업그래이드 하는 것이 더 쉽습니다. 또한 프레임워크는 코드에 구조를 부여하여 다른 사람들이 다른 프로젝트간의 컨텍스트와 기술을 유지할 수 있도록 도와줍니다. 반대로 사용자 정의 설정을 사용하면, 지원되지 않는 의존성 버전에 갇히기 쉬우며, 커뮤니티나 업그레이드 경로가 없는 (그리고 과거에 만들었던 프레임워크와 마찬가지로 더 엉성하게 설계된) 자체 프레임워크를 만들게 될 것입니다.

If your app has unusual constraints not served well by these frameworks, or you prefer to solve these problems yourself, you can roll your own custom setup with React. Grab react and react-dom from npm, set up your custom build process with a bundler like Vite or Parcel, and add other tools as you need them for routing, static generation or server-side rendering, and more. 앱에 이러한 프레임워크가 잘 지원하지 않는 비정상적인 제약 조건이 있거나 이러한 문제를 직접 해결하고 싶다면, React에 사용자 정의 설정을 적용할 수도 있습니다. npm에서 reactreact-dom 을 가져오고, Vite 또는 Parcel 같은 번들러로 사용자 정의 빌드 프로세스를 설정한 다음, 라우팅, 정적 생성 또는 서버 측 렌더링을 위해 다른 도구를 추가하세요.

Production-grade React frameworks프로덕션 등급 React 프레임워크

These frameworks support all the features you need to deploy and scale your app in production and are working towards supporting our full-stack architecture vision. All of the frameworks we recommend are open source with active communities for support, and can be deployed to your own server or a hosting provider. If you’re a framework author interested in being included on this list, please let us know.

Next.js

Next.js’ Pages Router is a full-stack React framework. It’s versatile and lets you create React apps of any size—from a mostly static blog to a complex dynamic application. To create a new Next.js project, run in your terminal:

Terminal
npx create-next-app@latest

If you’re new to Next.js, check out the learn Next.js course.

Next.js is maintained by Vercel. You can deploy a Next.js app to any Node.js or serverless hosting, or to your own server. Next.js also supports a static export which doesn’t require a server.

Remix

Remix is a full-stack React framework with nested routing. It lets you break your app into nested parts that can load data in parallel and refresh in response to the user actions. To create a new Remix project, run: Remix는 중첩 라우팅을 지원하는 풀스택 React 프레임워크입니다. 이 프레임워크를 사용하면 데이터를 병렬로 로드하고 사용자 동작에 따라 새로 고칠 수 있는 중첩된 부분으로 앱을 분할할 수 있습니다. 새 Remix 프로젝트를 생성하려면 다음을 실행하세요:

Terminal
npx create-remix

If you’re new to Remix, check out the Remix blog tutorial (short) and app tutorial (long). Remix를 처음 사용하는 경우 Remix 블로그 튜토리얼(short) 및 앱 튜토리얼(long)을 확인하세요.

Remix is maintained by Shopify. When you create a Remix project, you need to pick your deployment target. You can deploy a Remix app to any Node.js or serverless hosting by using or writing an adapter. Remix는 Shopify에서 유지 관리합니다. Remix 프로젝트를 생성할 때 배포 대상 선택을 해야 합니다. 어댑터를 사용하거나 작성하여 모든 Node.js 또는 서버리스 호스팅에 Remix 앱을 배포할 수 있습니다.

Gatsby

Gatsby is a React framework for fast CMS-backed websites. Its rich plugin ecosystem and its GraphQL data layer simplify integrating content, APIs, and services into one website. To create a new Gatsby project, run: 개츠비는 빠른 CMS 지원 웹사이트를 위한 React 프레임워크입니다. 풍부한 플러그인 생태계와 GraphQL 데이터 레이어는 콘텐츠, API, 서비스를 하나의 웹사이트로 통합하는 작업을 간소화합니다. 새 개츠비 프로젝트를 생성하려면 다음을 실행하세요:

Terminal
npx create-gatsby

If you’re new to Gatsby, check out the Gatsby tutorial. 개츠비를 처음 사용하는 경우 개츠비 튜토리얼을 확인하세요.

Gatsby is maintained by Netlify. You can deploy a fully static Gatsby site to any static hosting. If you opt into using server-only features, make sure your hosting provider supports them for Gatsby. 개츠비는 Netlify에서 유지 관리합니다. 정적 호스팅에 완전 정적 개츠비 사이트 배포를 할 수 있습니다. 서버 전용 기능을 사용하기로 선택한 경우 호스팅 제공업체가 개츠비에서 해당 기능을 지원하는지 확인하세요.

Expo (for native apps)

Expo is a React framework that lets you create universal Android, iOS, and web apps with truly native UIs. It provides an SDK for React Native that makes the native parts easier to use. To create a new Expo project, run: 엑스포는 진정한 네이티브 UI를 갖춘 범용 안드로이드, iOS, 웹 앱을 만들 수 있는 React 프레임워크이며, 네이티브 부분을 더 쉽게 사용할 수 있는 React Native 용 SDK를 제공합니다. 새 엑스포 프로젝트를 생성하려면 다음을 실행합니다:

Terminal
npx create-expo-app

If you’re new to Expo, check out the Expo tutorial. 엑스포를 처음 사용하는 경우, 엑스포 튜토리얼을 참고하세요.

Expo is maintained by Expo (the company). Building apps with Expo is free, and you can submit them to the Google and Apple app stores without restrictions. Expo additionally provides opt-in paid cloud services. 엑스포는 엑스포(회사)에서 유지 관리합니다. 엑스포를 사용하여 앱을 만드는 것은 무료이며, 제한 없이 구글 및 애플 앱스토어에 제출할 수 있습니다. 엑스포는 옵트인 유료 클라우드 서비스를 추가로 제공합니다.

Bleeding-edge React frameworks최첨단 React 프레임워크

As we’ve explored how to continue improving React, we realized that integrating React more closely with frameworks (specifically, with routing, bundling, and server technologies) is our biggest opportunity to help React users build better apps. The Next.js team has agreed to collaborate with us in researching, developing, integrating, and testing framework-agnostic bleeding-edge React features like React Server Components. React를 지속적으로 개선하는 방법을 모색하면서, React를 프레임워크(특히 라우팅, 번들링 및 서버 기술)와 더 긴밀하게 통합하는 것이 React 사용자가 더 나은 앱을 구축할 수 있도록 도울 수 있는 가장 큰 기회라는 것을 깨달았습니다. Next.js 팀은 React 서버 컴포넌트와 같이 프레임워크에 구애받지 않는 최첨단 React 기능을 연구, 개발, 통합 및 테스트하는 데 우리와 협력하기로 합의했습니다.

These features are getting closer to being production-ready every day, and we’ve been in talks with other bundler and framework developers about integrating them. Our hope is that in a year or two, all frameworks listed on this page will have full support for these features. (If you’re a framework author interested in partnering with us to experiment with these features, please let us know!) 이러한 기능들은 매일 프로덕션에 사용할 수 있는 단계에 가까워지고 있으며, 다른 번들러 및 프레임워크 개발자들과도 통합에 대해 논의하고 있습니다. 1~2년 안에 이 페이지에 나열된 모든 프레임워크가 이러한 기능을 완벽하게 지원하게 되기를 희망합니다. (이러한 기능을 실험해보고 싶은 프레임워크 작성자가 있다면 알려주세요!)

Next.js (App Router)

Next.js’s App Router is a redesign of the Next.js APIs aiming to fulfill the React team’s full-stack architecture vision. It lets you fetch data in asynchronous components that run on the server or even during the build. **Next.js의 앱 라우터는 React 팀의 풀스택 아키텍처 비전을 실현하기 위해 Next.js API를 재설계한 것입니다.** 서버에서 실행되거나 빌드 중에도 비동기 컴포넌트에서 데이터를 페치할 수 있도록 해줍니다.

Next.js is maintained by Vercel. You can deploy a Next.js app to any Node.js or serverless hosting, or to your own server. Next.js also supports static export which doesn’t require a server. Next.js는 Vercel에서 유지 관리합니다. Next.js 앱을 모든 Node.js 또는 서버리스 호스팅 또는 자체 서버에 배포할 수 있습니다. Next.js는 또한 서버가 필요치 않은 정적 내보내기도 지원합니다.

Deep Dive | 심층 탐구

Which features make up the React team’s full-stack architecture vision?React팀의 풀스택 아키텍처 비전을 구성하는 기능은 무엇인가요?

Next.js’s App Router bundler fully implements the official React Server Components specification. This lets you mix build-time, server-only, and interactive components in a single React tree. Next.js의 앱 라우터 번들러는 공식 React 서버 컴포넌트 사양을 완벽하게 구현합니다. 이를 통해 빌드 타임, 서버 전용, 인터랙티브 컴포넌트를 단일 React트리에서 혼합할 수 있습니다.

For example, you can write a server-only React component as an async function that reads from a database or from a file. Then you can pass data down from it to your interactive components: 예를 들어, 서버전용 React 컴포넌트를 데이터베이스나 파일에서 읽는 async 함수로 작성할 수 있습니다. 그런 다음 데이터를 인터랙티브 컴포넌트로 전달할 수 있습니다.

// This component runs *only* on the server (or during the build).
// 이 컴포넌트는 서버에서 (또는 빌드 중에) *단독적으로* 실행됩니다.
async function Talks({ confId }) {
// 1. You're on the server, so you can talk to your data layer. API endpoint not required.
// 1. 서버에 있으므로 데이터 레이어와 대화할 수 있습니다. API 엔드포인트는 필요하지 않습니다.
const talks = await db.Talks.findAll({ confId });

// 2. Add any amount of rendering logic. It won't make your JavaScript bundle larger.
// 2. 원하는 만큼 렌더링 로직을 추가합니다. JavaScript 번들을 더 크게 만들지는 않습니다.
const videos = talks.map(talk => talk.video);

// 3. Pass the data down to the components that will run in the browser.
// 3. 브라우저에서 실행될 컴포넌트에 데이터를 전달합니다.
return <SearchableVideoList videos={videos} />;
}

Next.js’s App Router also integrates data fetching with Suspense. This lets you specify a loading state (like a skeleton placeholder) for different parts of your user interface directly in your React tree: Next.js의 App Router는 데이터 페칭과 Suspense를 통합하기도 합니다. 이를 통해 사용자 인터페이스의 여러 부분에 대한 로딩 state(예: 스켈레톤 placeholder)를 React 트리에서 직접 지정할 수 있습니다.

<Suspense fallback={<TalksLoading />}>
<Talks confId={conf.id} />
</Suspense>

Server Components and Suspense are React features rather than Next.js features. However, adopting them at the framework level requires buy-in and non-trivial implementation work. At the moment, the Next.js App Router is the most complete implementation. The React team is working with bundler developers to make these features easier to implement in the next generation of frameworks. 서버 컴포넌트와 Suspense는 Next.js 기능이 아닌 React 기능입니다. 그러나 프레임워크 수준에서 이를 채택하려면 동의를 구하고 사소한 구현 작업이 필요합니다. 현재로서는 Next.js 앱 라우터가 가장 완벽하게 구현되어 있습니다. React팀은 차세대 프레임워크에서 이러한 기능을 더 쉽게 구현할 수 있도록 번들러 개발자와 협력하고 있습니다.