DEV Community

Discussion on: Structuring React Components

Collapse
 
omarjdv profile image
Omar Díaz

Everthing that you said it's very good.
A suggestons would be that when we're building a react app and must of the times we're using create react app, we would be trying to be modular app, and every component will be have his hooks and redux inside his folder, for example:

App/components/Table...

Inside this table if it's require:
reducer.js
utils.js

Using this approach we're building a modular component and it will be easily to eliminate in a future is if require and using all of that folder in another side without broken anything, by the way, the use of a absolutes routes is very a good approach!

:D

Best regards.

Collapse
 
admantium profile image
Sebastian

Hi Omar, yes, writing and using modular components would be the next steps, thx for this idea.

Collapse
 
omarjdv profile image
Omar Díaz

Thanks you for an amazing post!