leofuturer / eDrops3

The 3rd generation of the eDrops web application.
MIT License
0 stars 0 forks source link

Reorganize src/page/ #103

Closed Kenny477 closed 1 year ago

Kenny477 commented 1 year ago

We should try to adopt something similar to filesystem based routing, where we at least having our page folder structure consistent with that of the paths that each page corresponds to. Taking inspiration from frameworks like NextJS and SvelteKit:

  1. Pages should be located at the path corresponding to the URL e.g. /login should be located at src/page/login/index.tsx e.g. /manage/cart should be located at src/page/manage/cart/index.tsx e.g. /manage should be located at src/page/manage/index.tsx

  2. All associated component files only used by that page should be located in the corresponding page folder using PascalCase naming. e.g. some made up component like LoginForm.tsx in src/page/login/LoginForm.tsx Any shared components by multiple pages should be relocated to src/component folder.