add hikes/map pulls hikes out of db and renders

This commit is contained in:
Berkeley Martinez
2015-07-13 00:25:01 -07:00
parent 8f738fb1d0
commit de1d931b82
13 changed files with 161 additions and 54 deletions

View File

@@ -3,20 +3,23 @@ import React from 'react';
import { Router } from 'react-router';
import { history } from 'react-router/lib/BrowserHistory';
import debugFactory from 'debug';
import { Cat } from 'thundercats';
import { Render } from 'thundercats-react';
import { app$ } from '../common/app';
const debug = debugFactory('fcc:client');
const DOMContianer = document.getElementById('fcc');
const fcc = new Cat();
Rx.longStackSupport = !!debug.enabled;
// returns an observable
app$(history)
.flatMap(([ initialState ]) => {
return fcc.render(React.createElement(Router, initialState), DOMContianer);
.flatMap(({ initialState, AppCat }) => {
return Render(
AppCat(),
React.createElement(Router, initialState),
DOMContianer
);
})
.subscribe(
() => {