> 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/hocs/structure.md).

# Structure

hocs 폴더의 기본적인 규칙입니다.

<figure><img src="https://1168173052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9A2Jt7XcUkiyMXRHBecz%2Fuploads%2FsfLpNEAMuDfc4hrnmsID%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-08-13%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2011.10.49.png?alt=media&amp;token=7f18e7a1-50b7-403a-92cf-ecd806088642" alt="" width="425"><figcaption><p> next-init hooks</p></figcaption></figure>

## 문서 규칙

파일명은 접두사 `with`을 붙인 **pascalCase 로 작성하며 hoc 명칭과 파일명은 동일하게 합니다.**&#x20;

## 파일 명시 규칙

각 파일은 다음과 같이 두가지 방식을 따릅니다.&#x20;

1. **전역적**으로 사용하는 경우 (**앱 전체 공통 로직이 필요한 경우)**\
   **\[src]** -> **\[hocs] -**> **\[withSomeHoc.ts]**\
   e.g.  앱에서 사용하는 라이브러리 프로바이더 집합
2. **지역적**으로 사용하는 경우&#x20;

   **\[src]** -> **\[container]** -> **\[hocs] -**> **\[withSomeHoc.ts]**\
   **e.g step 관리 및 redirect 처리**

{% hint style="info" %}
**next-init boilerplate에 작성된 hocs 는 사용하지 않는다면 제거해주세요.**
{% endhint %}
