Files
freeCodeCamp/common/app/app-stream.jsx

14 lines
340 B
React
Raw Normal View History

2015-06-29 09:50:25 -07:00
import Rx from 'rx';
import { Router } from 'react-router';
import App from './App.jsx';
2015-06-29 09:50:25 -07:00
import childRoutes from './routes';
2015-06-29 09:50:25 -07:00
const router$ = Rx.Observable.fromNodeCallback(Router.run, Router);
const routes = Object.assign({ components: App }, childRoutes);
2015-06-29 09:50:25 -07:00
export default function app$(location) {
return router$(routes, location);
}