Project Structure in React
with Mackie
App
App
Components
App
Components
Api
App
Components
Api
Containers
App
Components
Api
Containers
Hooks, Hocs, Context
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
Store
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
Store
Translations
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
Store
Translations
Assets
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
Store
Translations
Assets
Styles
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
Store
Translations
Assets
Styles
Pages
App
Components
Api
Containers
Hooks, Hocs, Context
Helpers, Utilities
Testing
Store
Translations
Assets
Styles
Pages
Constants
Layouts
Router
Storybook
Types
Many many new features
Many many new features
Generic based | Feature based | |
---|---|---|
Reusability |
|
|
Scalability |
|
|
Maintainability |
Generic based | Feature based | |
---|---|---|
Reusability |
|
|
Scalability |
|
|
Maintainability |
Generic based | Feature based | |
---|---|---|
Reusability |
|
|
Scalability |
|
|
Maintainability |
Generic based | Feature based | |
---|---|---|
Reusability |
|
|
Scalability |
|
|
Maintainability |
PascalCase for folder component / component name
kebab-case for folder name / javascript file
One component / file
useSomething for hooks
withSomething for hocs
somethingContext for context
Project Structure in React
with Mackie