michaelbontyes / redux-simple-router-example

a redux-simple-router example using redux, react, babel, webpack, css modules and isomorphic-fetch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependencies

  • react 0.14.2
  • redux 3.0.4
  • redux logger 2.3.1
  • redux simple router 1.0.2
  • react router 1.0.0
  • babel 6.1.0
  • webpack 1.12.6
  • webpack-dev-middleware 2.0.0
  • express 4.13.3
  • post-css 0.7.0
  • autoprefixer 6.1.0
  • isomorphic-fetch 2.2.0
  • css modules

and most importantly Nothing else... okay marked for showing some markdown and request to make an API call

Run

npm install
npm start
open http://127.0.0.1:3000

Functions vs React components

For this example I mixed and matched between using functions and react components,

e.g. Footer is a react component, Header is just a function.

This was just to show the difference in the approach. In a real app you might have a consistent approach maybe using functions for the containers which connect to redux, and react components for the dumb components making use of react-css-modules... It is up to you, you can mix and match like I did in the example if you like I guess too.

License

MIT

About

a redux-simple-router example using redux, react, babel, webpack, css modules and isomorphic-fetch


Languages

Language:JavaScript 67.7%Language:CSS 29.1%Language:HTML 3.1%