https://github.com/madlittlemods/react-flux-todomvc
Classic TodoMVC w/ React and Flux architecture + sprinkle of best practices
https://github.com/madlittlemods/react-flux-todomvc
Last synced: 2 months ago
JSON representation
Classic TodoMVC w/ React and Flux architecture + sprinkle of best practices
- Host: GitHub
- URL: https://github.com/madlittlemods/react-flux-todomvc
- Owner: MadLittleMods
- Created: 2015-02-11T01:29:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-04T04:10:19.000Z (about 9 years ago)
- Last Synced: 2025-02-12T22:18:10.190Z (4 months ago)
- Language: JavaScript
- Homepage: http://madlittlemods.github.io/react-flux-todomvc/
- Size: 267 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Flux TodoMVC
[Classic TodoMVC](http://todomvc.com/) w/ [React](http://facebook.github.io/react/) and [Flux](http://facebook.github.io/flux/) architecture + sprinkle of best practices.
This project was started by following the [Flux TodoMVC tutorial](http://facebook.github.io/flux/docs/todo-list.html).
- [Webpack](http://webpack.github.io/) for builds
- Using the [`react-router`](https://github.com/rackt/react-router) to provide meaningful urls for filtering
- `http://app.com/all`, `http://app.com/active`, `http://app.com/completed`
- Filtering. This is in the actual TodoMVC spec but not implmented in the Flux tutorial.
- Using [Immutable.js](http://facebook.github.io/immutable-js/) for data structures
- Debounced persistant saving to [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API)# [Live Demo](http://madlittlemods.github.io/react-flux-todomvc/)
# Run/Build
To build:
- Clone the repo
- `npm install`
- `npm install webpack -g`
- `webpack`
- Set up your server to serve the app for all the sub-urls. [Instructions for Apache below](#apache-configurationsetup).
- Serve up the files# Apache Configuration/Setup
In order to serve the same app from any sub path (filters, `http://app.com/active`, in this case), we have tell Apache.
```apache
# All paths in todomvc/ directory will be served by the index
# http://app.com/todomvc
# http://app.com/todomvc/foo/barRewriteEngine On
# The normal index.html is fine so don't touch it
RewriteRule ^index\.html$ - [L]
# Anything that isn't a file or directory isn't messed up or rewrote
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite everything back to the root
RewriteRule . /todomvc/ [L]```