jeudi 10 août 2023

ask about component structure and architecture?

I'm a newbie working as a new FE developer. I've been thinking a lot about component structure in my development lately, e.g. where to call APIs, how much separation, how much nesting and depth of components, etc.

I've been reading a lot of articles and design patterns, and personally I've been working on a project using the presentational container pattern, but now I'm starting to have doubts.

I'm using hooks to manage state in one container, so I'm not using props and the hooks are responsible for all the state.

Folder structures

Hook Code

This feels very foreign to me and I think it's adding complexity.

I'm curious to know what you guys think (I realize that my structure may feel stupid), and I'd appreciate any recommendations for component structures or design patterns.

I've looked at various blogs, official documentation, and git conventions, but I haven't found a component structure or design pattern that works best.

Aucun commentaire:

Enregistrer un commentaire