This is sample small project build with React, Redux, RxJx, redux-observabled. Main purpuse of project is to create a playground to have production ready product which will do http request to hackernews and display it to user
Clone the repo and install Node dependencies
git clone https://github.com/marcelijanowski/react-webpack-es6-boilplate.git
yarn install
- Run
yarn build: this command is generating the bundles intodistfolder. - Your defulat web browser will open with localhost:9000
React components live in the components folder. Each component should be built in its own folder using Atomic design
I generally use Stateless Functional (vanilla ES6) design for Atoms. We generally use React Components (extends React.Component) for molecules and organisms.
- I ensure components implement some kind of
shouldRender()functionality to cover.isRequiredprops. - I use a
renderXYZ()style for partials, rather than inline{ condition && <JSX /> }. - We ensure all components have complete unit tests (not just snapshots).
.
├── dist # production build output
├── data # json mock data
├── layout # template
└── src # app source code
├── components # global reusable presentational components
├── containers # container components providing redux context
├── reducer # redux reducer with action/epics/reducer
├── services # modules abstracting communication with web
├── utils # app utility modules
└── index.js # app entry module with routing config
I'm using Jest, Enzyme to test components.
- Run
yarn test
- Run
yarn build - Dist folder will be create with production, minimized version