GiessC / sweep

MIT License
0 stars 0 forks source link

[REQUEST] View + Controllers Separation #46

Open GiessC opened 7 months ago

GiessC commented 7 months ago

Is your feature request related to a problem? Please describe. Next.js is useful for using both server and client components, however, most of our components are client components. We are not taking full advantage of the server components. Furthermore, we fetch a lot of data in client components that may be better performed in server components and passed to child, client components.

Describe the solution you'd like I believe that we can separate our components into multiple layers (controller/logic/view), allowing us to take advantage of the benefits of server vs. client components.

The most obvious spot to look is our forms, which we have lots of.

The earlier we catch (and fix) this the better, as we can standardize it and remove tech debt later on.

Describe alternatives you've considered Not separating these layers and operating more like a React app. Why use Next.js if we aren't going to use server components like we should?

Additional context N/A

GiessC commented 7 months ago

Labeled as 'configuration' and 'ui'. Although it doesn't directly affect the UI, this is definitely not a major nor minor feature, so we'll call it just a UI change.