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:
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
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.
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:
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
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.