DEV Community

Discussion on: React Architecture for Enterprise Application

Collapse
 
ausmurp profile image
Austin Murphy

This is obviously an opinionated subject. Ever since NextJS became popular I follow their folder structure, so src/pages, then do something similar to what you have outside of pages. Except I've never been a fan of the module based folder structure, so I always have folders for models, hooks, context, components (dumb components), containers (smart components).

Also there's a really good presentation from the NextJS conference about how to set up your project with shared components for NextJS (web) and React Native (app). This was just a few days ago, so I've changed my approach to mimic that with CRA as well.

Collapse
 
cb86at profile image
Christian

Could you kindly share a link to said NextJS shared components presentation? Thank you!

Collapse
 
ausmurp profile image
Austin Murphy

Starts at 1:44:04
youtu.be/PWi-49ODKAs

Collapse
 
ausmurp profile image
Austin Murphy

youtu.be/PWi-49ODKAs

Starts at 1:44:04

Collapse
 
j755jj5 profile image
Evgeniy
Thread Thread
 
cb86at profile image
Christian

Thank you!

Collapse
 
meatboy profile image
Meat Boy

I worked with both module based and container based structure of React. IMO container approach has lower entry level but in long term modules allow to easily extracting and reusing entire modules as dependency in different application.

Some comments have been hidden by the post's author - find out more