> For the complete documentation index, see [llms.txt](https://toktokhan.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://toktokhan.gitbook.io/docs/basic-guides/convention/containers.md).

# Containers

Containers 폴더 소개입니다.

{% hint style="warning" %}
해당 문서는 **최근 변경된 next-init**의 문서 양식을 따릅니다.

containers 폴더가 없는 레거시 프로젝트의 경우 해당 내용 대신 [Components](/docs/basic-guides/convention/components/structure.md)의 내용만 확인하면 됩니다.
{% endhint %}

<figure><img src="https://1168173052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9A2Jt7XcUkiyMXRHBecz%2Fuploads%2FvZ5To9ZCL7tvB9ETVPJl%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-07-17%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2010.43.08.png?alt=media&amp;token=95626b39-25b4-4f58-b97a-9701e509491c" alt="" width="563"><figcaption></figcaption></figure>

next-init에서 사용하는 [pages](/docs/basic-guides/convention/pages.md) **폴더와 1:1 대응하는 컴포넌트 폴더**입니다.

각 페이지에 들어 갈 **React 컴포넌트의 최상단** 파일들을 모아놓으며 **Components 폴더와 완전히 동일한 규칙**을 지닙니다.

자세한 컨벤션은 [Components 문서](/docs/basic-guides/convention/components/structure.md)를 참고해주세요.

{% hint style="info" %}
**왜 containers 은 components 폴더와 같은 규칙인데 따로 관리되나요?**\
\
이전에는 containers 의 모든 파일들이 components 폴더에서 관리되었습니다.

이러다 보니 현재 container에 해당하는 컴포넌트 뿐만 아니라

공용 컴포넌트 또한 같은 폴더 내에 있었기 때문에 **폴더 구조가 너무 깊어지는 문제**가 있었습니다.

때문에 현재는 각 페이지에 대응하는 최상단 컴포넌트는 container, 공용 컴포넌트는 @common 폴더 없이 사용하게 되었습니다.
{% endhint %}
