add initial react app

This commit is contained in:
Berkeley Martinez
2015-06-17 21:04:28 -07:00
parent bfddc0330f
commit a8540bee35
42 changed files with 299 additions and 244 deletions

3
client/README.md Normal file
View File

@@ -0,0 +1,3 @@
This is the entry point for the client
Code that should only run on the client should be put here.
NOTE(berks): For react specific stuff this should be the entry point

20
client/index.js Normal file
View File

@@ -0,0 +1,20 @@
import BrowserHistory from 'react-router/lib/BrowserHistory';
import debugFactory from 'debug';
import { Cat } from 'thundercats';
import AppFactory from '../common/app/appFactory';
const debug = debugFactory('fcc:client');
const DOMContianer = document.getElemenetById('#fCC');
const fcc = new Cat();
// returns an observable
fcc.render(AppFactory(BrowserHistory), DOMContianer)
.subscribe(
function() {
debug('react rendered');
},
function(err) {
debug('an error has occured', err.stack);
}
);