Skip to content

fix. app/(site)/_components 컴포넌트가 그대로 라우팅되는 문제 조사 #134

Description

@wooooooooook

https://thingo.kr/signup/_components/department-select-modal

접속 시 컴포넌트만 화면에 렌더링 되는 문제 확인됨

다만 실제로 문제가 발생하는지는 확인 해볼 필요가 있어서 수정하지 않고 기록만

원인

  1. next.js와 다르게 expo 는 /_components 폴더는 private folder 규칙으로 인정하지 않음
  2. app/(site)/_components 내부의 컴포넌트를 default export 하는 경우 url에 그대로 매핑됨

실제로 문제가 되는 케이스

모르겟음

예상 해결 방법

screen route 용 _layout.tsx 과 index.tsx 를 제외한 나머지 모든 컴포넌트 파일을 /app -> /components 하위 폴더로 이동

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions