2015-06-17 21:04:28 -07:00
|
|
|
import BrowserHistory from 'react-router/lib/BrowserHistory';
|
|
|
|
import debugFactory from 'debug';
|
|
|
|
import { Cat } from 'thundercats';
|
|
|
|
|
2015-06-29 09:50:25 -07:00
|
|
|
import app$ from '../common/app/app$.jsx';
|
2015-06-17 21:04:28 -07:00
|
|
|
|
|
|
|
const debug = debugFactory('fcc:client');
|
|
|
|
const DOMContianer = document.getElemenetById('#fCC');
|
|
|
|
const fcc = new Cat();
|
|
|
|
|
|
|
|
// returns an observable
|
2015-06-29 09:50:25 -07:00
|
|
|
app$(BrowserHistory)
|
|
|
|
.flatMap(app => {
|
|
|
|
return fcc.render(app, DOMContianer);
|
|
|
|
})
|
2015-06-17 21:04:28 -07:00
|
|
|
.subscribe(
|
|
|
|
function() {
|
|
|
|
debug('react rendered');
|
|
|
|
},
|
|
|
|
function(err) {
|
|
|
|
debug('an error has occured', err.stack);
|
|
|
|
}
|
|
|
|
);
|