ls-cool
Problem
- Framework without improvements
- File structures
- Refactoring
- Build tool
React
We use
SASS/COMPASS
MaterialUI
+
We use
"dependencies": {
...
"babel",
"i18n-webpack-plugin",
"immutable",
"webpack",
...
},
es6
es7
Creating application with
We use
"devDependencies": { ... "eslint",
"karma",
"karma-sinon", "karma-mocha", ...
"react-hot-loader", "redux-devtools", ... },
ToolBox
- Hot Reload
- Redux DevTools
- BEM
- SASS
- Tests (reducers)
- Localization
- Feature folders
- Webpack
- Middleware
Redux DevTools
import _ from 'lodash';
import ApiClient from 'api/ApiClient';
import tokenService from '../TokenService';
let api = new ApiClient(tokenService);
export default function apiMiddleware(getState) {
return next => (action) => {
// wrap functions with api and getState params
if (_.isFunction(action)) {
next(action(api, getState));
} else {
next(action);
}
};
}
Middleware
+---api
+---app
| +---features
| | +---feed
| | +---login
| | | \---assets
| | | \---images
| | +---main
| | | \---components
| | | +---loader
| | | | \---assets
| | | \---menu
| | | \---assets
| | | \---images
| | +---purchased
| | \---shared
| | +---assets
| | | \---sass
| | \---components
| | \---auth
| \---utils
| \---middlewares
+---assets
| +---fonts
| \---sass
\---lib
Feature folders
Own generator
npm install generator-redux-component
deck
By Jenya Terpil
deck
- 3,233