Reactas frontend app frameworkReduxas state containerWebpackas build toolSCSSas CSS extension languageBEMmethodology for style organization
Because this application is compiled to a valid Magento 2 theme, it must follow Magento theme structure.
?> Note: initially Magento_Theme folder is empty. You have to compile the application (please read instructions for our bundler). Or direct to (Quick start instructions)[./05-Quick-Start.md].
etc– Magento 2 Theme dir configurationMagento_Theme– Magento 2 Theme dir Compiled assetstemplatesroot.phtml– _Magento 2 Theme root template Compiled fromsrc/public/index.html
webassets– Compiled fromsrc/public/assets*.(js|css)– Compiled JS and CSS assets
media–Magento 2 Theme dir For theme preview picture in admintheme.xml- Magento 2 Theme file Theme registration fileregistration.php- Magento 2 Theme file Theme registration file
node_modules– Installed NodeJS dependencies (.gitignore)src–_ReactJS Theme_Source filesapp– Application rootindex.js– Application entry-pointutil– Application wise (utilities) helpersUtilGroupName– Utility grouped by functional*.js– Utility nameindex.js– Webpack alias file
type– React PropTypes declarationPropTypeGroup.js– React PropType declaration grouped by source
query– Queries for GraphQL requestsQueryName.query.js– Query source fileindex.js– Webpack alias file – contains collection of queries
component– ReactJS componentsComponentName– Component rootComponentName.component.js– HTML template and render related logicComponentName.container.js– Component business logic & Redux connectionComponentName.test.js– Component unit testsComponentName.style.scss– Component stylesindex.js– Webpack alias file - exports Container (if exists), otherwise exports Component.
route– ReactJS route collectionRouteName– Route rootRouteName.js– Route related business logicRouteName.scss– Route specific stylesindex.js– Webpack alias file
index.js– Router initialization
store– Redux store configurationStoreModifierName– Redux modifier rootStoreModifierName.reducer.js– Modifier action handlerStoreModifierName.dispatcher.js– Modifier action dispatcher (for async executions)StoreModifierName.action.js– Modifier action declarationindex.js– Alias file - exports Reducer, Dispatcher, Action.
index.js– Reducer combination, Redux initialization
style– Application wise styles read more about stylesabstract– Virtual SASS functions, mixins (non compilable) will be injected into every component style_abstract.scss– File which imports all abstract functions in right order_*.scss– Abstract functional implementations
base– Styles to native HTML5 elements_reset.scss– CSS reset_root.scss–:rootstyles (CSS custom variables declaration)_*.scss– Native element style
config– Project configurationpublic– Files shared as is.static– Static assetsindex.html– Template forroot.phtml.
Read the quick introduction to the project.
This project has defined coding standard.
Learn more about debugging in the project here