Frontend Overview

김종민·2022년 7월 25일
0

apple-market

목록 보기
2/37


들어가기
frontend의 개괄적인 구성방법을 알아본다.

  1. 크게
    /components
    /libs
    /pages
    세개의 folder로 구성된다.
    NextJs는 rounter가 엄청나게 편하게 되어있다.
    /Pages의 index.tsx부분이 localhost:3000 을 연결했을떄 열리는 화면이다.

  2. 그리고 /pages/enter.tsx 파일일
    localhost:3000/enter 주소로 열리는 화면이다.

  3. /pages/profile/index.tsx ==>localhost:3000/profie 주소로 열리는 page

  4. /pages/profile/edit.tsx ===>localhost:3000/profile/edit 로 열리는 page

  5. /pages/items/[id].tsx ==>localhost:3000/items/1,2,3 등등 id로 열리는 page

  6. /components 폴더는 Layout이나 Button등등 여러 page에서 공통적으로 사용되는 component들을 담아둔다.

  7. /lins에서는 page에서 사용될 function등을 담아둔다.

  8. 다음장에서는 components와 libs에 대해서 알아본다.

profile
코딩하는초딩쌤

0개의 댓글