add initial react app
This commit is contained in:
3
client/README.md
Normal file
3
client/README.md
Normal 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
20
client/index.js
Normal 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);
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user