dynamic react router

This commit is contained in:
Eric Hulburd
2016-02-29 18:20:00 -06:00
parent 51eaa19a92
commit c890132f2b
44 changed files with 1163 additions and 733 deletions

View File

@@ -1,13 +1,14 @@
import 'babel-polyfill';
import 'bootstrap/dist/js/bootstrap.min';
import React from 'react';
import ReactDOM from 'react-dom';
import Layout from './dashboard/layout/layout';
import {Router} from 'react-router';
export default function(){
import {ROUTES} from './dashboard/routes';
export default function(history){
ReactDOM.render(
React.createElement(Layout),
React.createElement(Router, {routes: ROUTES, history: history}),
document.getElementById('root')
);
};