generator-react-hapi-universal
Version:
Scaffold a Universal JavaScript app using React, hapijs, and react-router
12 lines (9 loc) • 323 B
JavaScript
import React from 'react';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import { Router } from 'react-router';
import routes from '../../app/routes';
const history = createBrowserHistory();
React.render(
<Router children={routes} history={history} />,
document.getElementById('react-view')
);