DEV Community

Discussion on: Scalable React Components architecture

Collapse
frenkix profile image
Goran Jakovljevic • Edited

Thanks for the article.

You have the input as a child of ul, you should wrap it inside li or semantically, move it above UL.

I like the idea behind folder pattern, but I am not a fan of having tons of index.js files. I suppose you set the editor to show the folder name of the opened file as well or else you would be having lots of index.js files and it would be impossible to switch between them.

I like the container component pattern. You have a container component that does all the data fetching and formatting, and then you have the view component that only acts as the view/presentational component. Its actually very similar to folder pattern except it uses different names and in most cases does not contain folders but it depends on use/case and how many child views main component has.

Collapse
carloscuesta profile image
Carlos Cuesta Author

Yeah semantically, the Input should be placed out of the ul element.

In my opinion, tools should not change the way we structure and code our projects. Tools must be improved and changed if needed. On my specific use case I use Atom and I switch between files using the ⌘+P and the name of the folder.

Thanks for sharing your opinion!