All Projects → webpro → react-redux-demo

webpro / react-redux-demo

Licence: other
Fun Fair

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

React + Redux + React-Router demo

Introduction

Since I got excited about the React + Redux combo, I've tried it out on a current project. It was working well for me, so I've extracted relevant parts out into this demo.

This demo application represents a "fun fair" (amusement park) with two daily shifts (morning and afternoon), while each shift has a group of semaphores to indicate the queue length (of people waiting for the attraction). The semaphores are updated automatically server-side (just polling every 5 seconds in this demo), but employees can also change the state of a semaphore by clicking on it and submitting the form.

JS stack

CSS stack

  • SASS (node-sass)
  • PureCSS
  • PostCSS + Autoprefixer

Features

  • Async actions (i.e. XHRs)
  • Middleware
  • Basic development/production toggle
    • __DEV__: react-hot-loader, logger middleware
    • Non-__DEV__: optimize with UglifyJS
  • CSS is compiled separately

Development

npm install
npm run dev

Go to http://localhost:8080/public.

Production build

npm run build

Find build at ./build/bundle.js.

TODO

  • Improve on applying Redux architecture
  • Better error handling
  • Input validation
  • Better config options
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].