This is a sample implementation of a sub-reddit using the Redux state management and Redux-thunk async middleware.
- React project set up by
npx create-react-app redux-reddit
- Structure the app according to redux convention by
mkdir actions components containers reducers store
- Imagine the shape of the essential app state tree
- Create components for mockup
- Have relevant actions ready including async ones
- Implement reducers composition accordingly and combine
- Configure store with middlewares
- Provide store for root component and connect containers to redux with
connect()
- Add dependencies by
npm install
- Run or build according to
create-react-app
docs, e.g.npm start