forked from usds/us-forms-system-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
28 lines (23 loc) · 747 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react';
import ReactDOM from 'react-dom';
import { IndexRedirect, Route, Router, useRouterHistory } from 'react-router';
import { Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux';
import { createHistory } from 'history';
import 'us-forms-system/lib/css/styles.css';
import route from './js/routes.jsx';
import reducer from './js/reducers';
import Form from './js/components/Form.jsx';
const store = createStore(combineReducers(reducer));
const browserHistory = useRouterHistory(createHistory)({
basename: ''
});
ReactDOM.render(
(
<Provider store={store}>
<Router history={browserHistory}>
{route}
</Router>
</Provider>
), document.getElementById('root')
);