/redux-reddit

Primary LanguageJavaScript

Redux Reddit

This is a sample implementation of a sub-reddit using the Redux state management and Redux-thunk async middleware.

How it is done

  1. React project set up by npx create-react-app redux-reddit
  2. Structure the app according to redux convention by mkdir actions components containers reducers store
  3. Imagine the shape of the essential app state tree
  4. Create components for mockup
  5. Have relevant actions ready including async ones
  6. Implement reducers composition accordingly and combine
  7. Configure store with middlewares
  8. Provide store for root component and connect containers to redux with connect()

How to use

  1. Add dependencies by npm install
  2. Run or build according to create-react-app docs, e.g. npm start