-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.jsx
35 lines (32 loc) · 1.15 KB
/
app.jsx
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
29
30
31
32
33
34
35
const React = require('react'),
ReactDOM = require('react-dom'),
HashRouter = require('react-router-dom').HashRouter,
Route = require('react-router-dom').Route,
Switch = require('react-router-dom').Switch,
Link = require('react-router-dom').Link,
Ting = require('./ting.jsx'),
Settings = require('./settings.jsx'),
Provider = require('react-redux').Provider,
createStore = require('redux').createStore,
RootReducer = require('./reducers/root.jsx'),
ConnectedTing = require('./containers/connected_ting.jsx'),
ConnectedSettings = require('./containers/connected_settings.jsx');
const App = React.createClass({
render: function() {
return (
<HashRouter>
<Switch>
<Route exact path='/' component={ConnectedTing} />
<Route path='/settings' component={ConnectedSettings} />
</Switch>
</HashRouter>
);
}
});
const store = createStore(RootReducer);
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('app')
);